SELECT TOP 100 PERCENT dbo.sysobjects.name AS TableName,
dbo.syscolumns.name AS FieldName, dbo.systypes.name AS FieldType,
dbo.syscolumns.length, dbo.syscolumns.isnullable, dbo.syscolumns.prec,
dbo.syscolumns.scale
FROM dbo.sysobjects INNER JOIN
dbo.syscolumns ON dbo.sysobjects.id = dbo.syscolumns.id INNER JOIN
dbo.systypes ON dbo.syscolumns.xtype = dbo.systypes.xtype
WHERE (dbo.sysobjects.xtype = 'U')
ORDER BY dbo.sysobjects.id, dbo.syscolumns.colid