How to find all tables containing column with specified name - MS SQL Server

 Hello Friends, sometime you face in database where we use same colums in database, or where this colum is connected. Today i face this thing so i get this solution fom MS SQL Server's INFORMATION_SCHEMA.

Check this Quarry for find tables where we can find colum.




select * from INFORMATION_SCHEMA.COLUMNS 

where COLUMN_NAME like '%COLUMN_NAME%' 

order by TABLE_NAME


Here check this Quarry,replace your column name to  COLUMN_NAME and run in sql server, you get list of data that contain column related tables where colun are used.

Comments