- Published on
Find Tables by Column names in SQL Server
- Authors
- Name
- Jeevan Wijerathna
- @iamjeevanvj
Find Tables by column names
While I was working on large legacy SQL server database I always wanted to find the Tables which has some columns. Below is the query I usually used to find the Tables by Column names.
SELECT c.name AS ColumnName, t.name AS TableNameFROM sys.columns c JOIN sys.tables t ON c.object_id = t.object_idWHERE c.name LIKE 'column_name';