Obtain data in the database tables, fields, type, length, data structures, and other information (SQL Server 2008)

Obtain data in the database tables, fields, type, length, data structures, and other information (SQL Server 2008)


Acquired data in the database tables, fields, type, length, data structures, and other information


 SELECT         dbo.sysobjects.name AS sTableName,
                           dbo.syscolumns.name AS sColumnsName,
                           dbo.syscolumns.prec AS iColumnsLength,
                           dbo.syscolumns.colorder AS iColumnsOrder,
                           dbo.systypes.name + '' AS sColumnsType,
                           dbo.syscolumns.isnullable AS iIsNull
 FROM             dbo.sysobjects INNER JOIN
                           dbo.syscolumns ON dbo.sysobjects.id = dbo.syscolumns.id INNER JOIN
                           dbo.systypes ON dbo.syscolumns.xusertype = dbo.systypes.xusertype
 WHERE         (dbo.sysobjects.xtype = 'U')


Please correct me if wrong

Original: Large column  to obtain data in the database tables, fields, type, length, data structures, and other information (SQL Server 2008)


Guess you like

Origin www.cnblogs.com/chinatrump/p/11518144.html