两条实用的 SQL 语句
--读取库中的所有表名
Select [name] from sysobjects where xtype = 'u'
--读取指定表的所有列名
Select [name] from syscolumns
where id = (Select MAX(id) from sysobjects where xtype = 'u' and [name] = '表名')
--读取库中的所有表名
Select [name] from sysobjects where xtype = 'u'
--读取指定表的所有列名
Select [name] from syscolumns
where id = (Select MAX(id) from sysobjects where xtype = 'u' and [name] = '表名')