+ 1
How to find a column_name or field name in a data base that contains many tables?
i want to find does tables that contain my tatget field or column name please help me to do that
2 Answers
+ 4
Try this:
https://stackoverflow.com/questions/26293085/find-all-table-names-with-column-name/26293118
SELECT c.name AS ColName, t.name AS TableName
FROM sys.columns c
JOIN sys.tables t ON c.object_id = t.object_id
WHERE c.name LIKE '%column_name%';
also look here:
https://stackoverflow.com/questions/4849652/find-all-tables-containing-column-with-specified-name-ms-sql-server
+ 1
thanks for your answer