How to find all tables by column name
by Shubham Batra
So, in sql server we often have to find all the tables by column name or you can say where we have used specific column name. So for that purpose we can use following query.
select * from INFORMATION_SCHEMA.COLUMNS where COLUMN_NAME like '%key%' order by TABLE_NAME
This query will return us all the tables where we have used Key column anywhere . You can have a look at following image where we have found all tables where specified column as use
So you can modify your column name at the place of "key" accordingly and fetch out the correct results. This is how to find all tables by column name in sql server.