两条实用的 SQL 语句

--读取库中的所有表名

Select [name] from sysobjects where xtype = 'u'

--读取指定表的所有列名

Select [name] from syscolumns
where id = (Select MAX(id) from sysobjects where xtype = 'u' and [name] = '表名')
posted @ 2011-05-13 13:07  walfud  阅读(268)  评论(0编辑  收藏  举报