Get Record all table name with specific column and its all information from the database

SELECT so.name , column_name ‘Column Name’,
data_type ‘Data Type’,
CHARacter_maximum_length ‘Maximum Length’
FROM information_schema.columns sc
inner join sysobjects so on sc.TABLE_NAME = so.name
where so.xtype =’U’ and (sc.COLUMN_NAME like ‘%columnName%’)
order by so.name,sc.COLUMN_NAME asc

Leave a comment