sync
This commit is contained in:
9
DBG - get unique and primary constraints.sql
Normal file
9
DBG - get unique and primary constraints.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
SELECT kc.name, SCHEMA_NAME(ot.schema_id)+'.'+ot.name AS tblName, kc.type_desc
|
||||
FROM sys.key_constraints kc
|
||||
JOIN sys.objects oc ON oc.object_id = kc.object_id
|
||||
JOIN sys.objects ot ON ot.object_id = oc.parent_object_id
|
||||
WHERE 1=1
|
||||
--AND oc.name LIKE 'fk%'
|
||||
ORDER BY tblName
|
||||
;
|
||||
Reference in New Issue
Block a user