查询所有表名与指定表的所有列名

select name from sysobjects where xtype='u' --读取库中的所有表名

select name from syscolumns where id=(select max(id) from sysobjects where xtype='u' and name='表名') --读取指定表的所有列名

猜你喜欢

转载自www.cnblogs.com/Anthony518/p/10908234.html