+ 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

30th Sep 2018, 6:26 PM
Amir Rafati
Amir Rafati - avatar
2 Respuestas
+ 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
30th Sep 2018, 6:46 PM
Burey
Burey - avatar
+ 1
thanks for your answer
30th Sep 2018, 6:58 PM
Amir Rafati
Amir Rafati - avatar