I once needed the lines of the stored procedures to be able to trace whether I have a reference to some function, procedure or table, or sometimes to try to find something i
View Dependencies
In SQL Server Management Studio, right-click on a table, and choose "View Dependencies". You will see every object that references the table
INFORMATION_SCHEMA
The actual code for a stored proc, view, constraint, etc is stored in SysComments
. You should query this using the views provided in the schema Information_Schema
. Here are all the components of the Information_Schema.