当前位置: 代码迷 >> Sql Server >> 在sql server中怎么获得表名和字段名
  详细解决方案

在sql server中怎么获得表名和字段名

热度:52   发布时间:2016-04-27 16:49:33.0
在sql server中如何获得表名和字段名?
在sql   server中如何获得表名和字段名?

------解决方案--------------------
sysobjects
syscolumns
------解决方案--------------------
--表名
select name from sysobjects
where type= 'U '
--字段名
select name from syscolumns
where id=object_id( '表名 ')
  相关解决方案