select a.Table_Name, a.Column_Name from INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE a,
INFORMATION_SCHEMA.TABLE_CONSTRAINTS b
where b.constraint_type='PRIMARY KEY' and a.constraint_name = b.constraint_name
--and a.table_name='T_8KCompany'
order by a.table_name, a.column_name
No comments:
Post a Comment