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
SQL语句怎样知道表的字段名例子
最新推荐文章于 2022-01-25 13:52:06 发布