You can use the INFORMATION_SCHEMA.TABLE_CONSTRAINTS view like:
SELECT tc.CONSTRAINT_NAME
FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS as tc
WHERE tc.TABLE_SCHEMA = 'dbo'
and tc.TABLE_NAME = '<your_table>'
and tc.CONSTRAINT_TYPE = 'PRIMARY KEY';
sqlYou can use the INFORMATION_SCHEMA.TABLE_CONSTRAINTS view like:
SELECT tc.CONSTRAINT_NAME
FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS as tc
WHERE tc.TABLE_SCHEMA = 'dbo'
and tc.TABLE_NAME = '<your_table>'
and tc.CONSTRAINT_TYPE = 'PRIMARY KEY';
sqlDetermining Security,Determining Security Patch
No comments:
Post a Comment