writings on my experiences and learnings in SQL Server...
TSQL script - to identify all the columns with specific datatype in specific database
SELECT OBJECT_NAME(C.OBJECT_ID) TableName, C.name ColumnName FROM sys.columns AS C JOIN sys.types AS T ON C.user_type_id=T.user_type_id WHERE T.name = 'INT' --you can change to other datatypes ORDER BY C.OBJECT_ID; GO
No comments:
Post a Comment