Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Avoiding selection primary key in sysindexes
Message
 
To
04/03/2008 23:08:32
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
01298781
Message ID:
01298787
Views:
16
Add a where clause:

WHERE NOT IN (SELECT key_column_usage.COLUMN_NAME FROM information_schema.table_constraints
INNER JOIN information_schema.key_column_usage
ON table_constraints.constraint_name = key_column_usage.constraint_name
WHERE
table_constraints.constraint_type = 'PRIMARY KEY' AND table_constraints.table_name = 'table_name')

?
Woodie Westbrook
I came, I saw, I compiled.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform