If you would like to search all tables in a database for a particular column name, here's a sample query for that:
SELECT TABLE_NAME,COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME LIKE '%EmployeeNo%'
ORDER BY TABLE_NAME
Here the column name been searched for is -'EmployeeNo'
0 Komentar