Advertisement
krot

sql server просмотр уникальных ключей

Mar 7th, 2018
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.26 KB | None | 0 0
  1. select TC.TABLE_NAME,TC.Constraint_Name, CC.Column_Name from information_schema.table_constraints TC
  2. inner join information_schema.constraint_column_usage CC on TC.Constraint_Name = CC.Constraint_Name
  3. where TC.constraint_type = 'Unique'
  4. order by TC.Constraint_Name
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement