How To Search a particular Column Name in any Table using T-SQL?

How To Search a particular Column Name in any Table using T-SQL?



SELECT OBJECT_NAME(obj.object_id) as [Name], type_desc as [Type] FROM sys.objects obj inner join sys.columns col ON col.object_id = obj.object_id WHERE col.NAME Like '%Employee%' ORDER BY [Type]


SELECT TABLE_NAME,ORDINAL_POSITION FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME like '%Employee%'

No comments: