Wednesday, December 23, 2015

TSQL: find out which table a constraint belongs to

TSQL: find out which table a constraint belongs to


SELECT
   OBJECT_NAME(o.parent_object_id)
FROM
   sys.objects o
WHERE
   o.name = 'ConstraintABC' AND o.parent_object_id <> 0

No comments: