How can I get a list of all the tables that have a specific column name?
--get tables that contains selected columnName
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 '%batchno%'
its worked...