select t.TABLE_SCHEMA, t.TABLE_NAME,
t.CONSTRAINT_SCHEMA, t.CONSTRAINT_NAME, t.CONSTRAINT_TYPE,
c.COLUMN_NAME
from information_schema.table_ constraints t
join information_schema.constraint_column_usage c
on t.Constraint_Name = c.Constraint_Name
--where t.CONSTRAINT_NAME = 'UC_Something'
--where t.CONSTRAINT_TYPE = 'Unique'
--where t.TABLE_NAME = 'TableName'
...
No comments:
Post a Comment