select a.Object_id, b.Name as 'TableName', a.Column_Id , a.Name as 'ColumnName', a.Is_nullable, c.Name as 'DataType' from sys.columns a
inner join sys.tables b on a.Object_id = b.Object_id
inner join sys.types c on a.system_type_Id = c.system_type_Id
and b.type = 'U' order by b.name
Run this T-SQL query in management studio and will return all user defined table with respective column name & datatypes.
Thanks, Guna.
|
No responses found. Be the first to respond and make money from revenue sharing program.
|