Find all tables containing column with specified name - MS SQL Server - Stack Overflow

PHOTO EMBED

Fri Jun 03 2022 07:26:03 GMT+0000 (Coordinated Universal Time)

Saved by [deleted user] #sql

SELECT      COLUMN_NAME AS 'ColumnName'
            ,TABLE_NAME AS  'TableName'
FROM        INFORMATION_SCHEMA.COLUMNS
WHERE       COLUMN_NAME LIKE '%MyName%'
ORDER BY    TableName
            ,ColumnName;
content_copyCOPY

https://stackoverflow.com/questions/4849652/find-all-tables-containing-column-with-specified-name-ms-sql-server