Finding dependencies on a table column

This will list stored procedures, views, etc. that uses a given table column:

SELECT OBJECT_NAME( Dependent_Object,
      (SELECT xtype FROM sysobjects so WHERE = Object_Type
FROM sysobjects so
INNER JOIN syscolumns sc ON =
INNER JOIN sysdepends sd  ON = sd.depid and sc.colid = sd.depnumber
WHERE = OBJECT_ID('tblcategorypage')
AND = 'categorytype'

Credits for this tip to SQLServerCentral.


Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.