Friday, September 4, 2009

retrieve table name type field name field type

The following sql command gets you the Table Names, and table names’ field names, field names’ datatype and datatype’s length from a DATABASE

FROM sysobjects
JOIN syscolumns ON =
JOIN systypes ON syscolumns.xtype=systypes.xtype
WHERE sysobjects.xtype='U'
ORDER BY,syscolumns.colid

No comments: