Last active
May 22, 2024 06:38
-
-
Save DocGreenRob/b8074db95dc0017ad80224c9740ea9c9 to your computer and use it in GitHub Desktop.
Find references in all Columns and Tables
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
SELECT column_name, | |
table_name, | |
table_schema | |
FROM information_schema.columns | |
WHERE column_name LIKE '%calendar%' | |
AND table_schema IN ( 'dbo' ) | |
ORDER BY table_name, column_name |
[Azure Data Factory | Copy multiple tables in Bulk with Lookup & ForEach](https://www.youtube.com/watch?v=KsO2FHQdILs)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To find all tables that have a particular column, you can use the following SQL query:
Replace
'YourColumnName'
with the name of the column you are looking for.To find all stored procedures that reference a particular column, you can use this query:
Replace
'YourColumnName'
with the name of the column you are looking for. This query searches for stored procedures that contain the column name within their definition.Both queries should be run in SQL Server Management Studio (SSMS). Let me know if you need further customization or assistance!