Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Return the colid of primary key for table
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00663859
Message ID:
00663863
Views:
21
>>I'm trying to write a query of the system tables in my DB where I pass it the id of the table - and what I want to get back is the colid and name of the column that is the primary key for the table.
>
>It's not recomended directly query SQl Server system tables. If you're using SQL 2000 see if you can get that info from Information Schema views.

Thanks Sergey - I just did a search in BOL and it returned over a hundered items when seraching for 'Information Schema views'. Can you perhaps narrow the scope of where I should look to find specifically what I am looking for? I appreciate your assistance.
Al Williams

Anola MB, CANADA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform