krot

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

Mar 7th, 2018
75
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data