Created
November 20, 2014 23:01
-
-
Save jacobhackl/6922bcde095d147d2fe5 to your computer and use it in GitHub Desktop.
Search SQL objects for a column
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Search in All Objects | |
| SELECT OBJECT_NAME(OBJECT_ID), | |
| definition | |
| FROM sys.sql_modules | |
| WHERE definition LIKE '%' + 'CreatedDate' + '%' | |
| GO | |
| -- Search in Stored Procedure Only | |
| SELECT DISTINCT OBJECT_NAME(OBJECT_ID), | |
| object_definition(OBJECT_ID) | |
| FROM sys.Procedures | |
| WHERE object_definition(OBJECT_ID) LIKE '%' + 'CreatedDate' + '%' | |
| GO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment