I have a column and i need to find in which table this column exists throughout whole DB
Database
3
Posts
3
Posters
1
Views
1
Watching
-
I have a column and i need to find in which table this column exists throughout whole DB Using query
-
I have a column and i need to find in which table this column exists throughout whole DB Using query
The column name is not unique. The column with a particular name may be in every DB table. And BTW, what DBMS are talking about: MS Access, SQL Server, Oracle, PostgrSQL, ...?
-
I have a column and i need to find in which table this column exists throughout whole DB Using query
Assuming Sql Server:
SELECT SCHEMA_NAME(schema_id) [Schema Name]
,t.name AS [Table Name]
FROM sys.tables AS t
JOIN sys.columns c ON t.OBJECT_ID = c.OBJECT_ID
WHERE c.name = 'ColumnName'Wrong is evil and must be defeated. - Jeff Ello