In SqlServer. How do you query a db to bring back all the tables that have a field of a specific name?
A:
Stu
2008-08-06 15:43:32
A:
Curt Hagenlocher
2008-08-06 15:43:54
+3
A:
The following query will bring back a unique list of Tables where Column_Name is equal to the column you are looking for:
Select
Table_Name
From
INFORMATION_SCHEMA.COLUMNS
Where
Column_Name = 'Desired_Column_Name'
Group By
Table_Name
GateKiller
2008-08-06 15:46:09