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

1 comment:

Anonymous said...

You may be also interested in the microsoft repair mssql database program, it automatically fixes corrupted database files