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 @ 2006-11-08 18:00  '.Elvis.'  阅读(371)  评论(0)    收藏  举报