当前位置: 代码迷 >> Sql Server >> 关于用命令查询的两个有关问题
  详细解决方案

关于用命令查询的两个有关问题

热度:105   发布时间:2016-04-27 19:32:31.0
关于用命令查询的两个问题
在SQL2005中 ,怎么用命令查看,一个数据库中有多少张表,还有怎么用命令查看一张表中有多少字段?

------解决方案--------------------
SQL code
--用户表的个数select * from sysobjects where xtype='u'select count(*) from sysobjects where xtype='u'--表的详细信息select   *   from   syscolumns   where   id=object_id('表名')select   count(*)   from   syscolumns   where   id=object_id('表名')
  相关解决方案