Use the below query to find out the data type of all the columns of a particular table .
SELECT syscolumns.name AS ColumnName, systypes.name AS Datatype
FROM sysobjects, syscolumns, systypes
WHERE sysobjects.id = syscolumns.id
AND syscolumns.xtype = systypes.xtype
AND sysobjects.name = 'table1'
In the above just replace the table1 with the your desired table.
Wednesday, February 25, 2009
DataTypes in SQL Server
Labels:
SQL Server,
SQL Server Tips
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment