贫民窟里的程序高手

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

本文转载自:http://hi.baidu.com/ajyajyajy/item/4e2a7f4dc83393d2c1a592c1

use DBNAME
go
select * from sysobjects where xtype='U'; --这是查询所有表的信息
select count(*) from sysobjects where xtype='U' --这是查询表的数量

‍select a.name, b.rows from sysobjects a with(nolock) join sysindexes b with(nolock) on b.id=a.id where a.xtype='U' and b.indid in (0,1) order by a.name asc --这是快速查询所有表中的数据量

posted on 2014-06-19 21:50  贫民窟里的程序高手  阅读(1629)  评论(0)    收藏  举报