您的位置:首页 > 数据库

SQL server 2005查询数据库表的数量和表的数据量

2013-07-07 00:27 330 查看
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 --这是快速查询所有表中的数据量
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
相关文章推荐