Return to Snippet

Revision: 31897
at September 15, 2010 15:42 by hairajeshk


Initial Code
SELECT t.name AS table_name,
SCHEMA_NAME(schema_id) AS schema_name,
c.name AS column_name
FROM sys.tables AS t
INNER JOIN sys.columns c ON t.OBJECT_ID = c.OBJECT_ID
WHERE c.name LIKE '%EmployeeID%'
ORDER BY schema_name, table_name;

Initial URL


Initial Description
Find column name in all tables of a database

Initial Title
Find Column Name in all tables in a Database

Initial Tags
database, find

Initial Language
SQL