SQL Server Query Utilities



This content originally appeared on DEV Community and was authored by Romero Dias

Search tables

SELECT      c.name  AS 'ColumnName',
            (SCHEMA_NAME(t.schema_id) + '.' + t.name) AS 'TableName'
FROM        sys.columns c
JOIN        sys.tables  t   ON c.object_id = t.object_id
WHERE       c.name LIKE '%ColumnName%'
ORDER BY    TableName
            ,ColumnName;


This content originally appeared on DEV Community and was authored by Romero Dias