SQLSERVER中统计所有表的记录数
2012-04-12 10:35
211 查看
set nocount on
if object_id(N'tempdb.db.#temp') is not null
drop table #temp
create table #temp (name sysname,count numeric(18))
insert into #temp
select o.name,i.rows
from sysobjects o,sysindexes i
where o.id=i.id and o.Xtype='U' and i.indid<2
select count(count) 总表数,sum(count) 总记录数 from #temp
select * from #temp order by count desc
set nocount off
转自:/article/5603546.html
if object_id(N'tempdb.db.#temp') is not null
drop table #temp
create table #temp (name sysname,count numeric(18))
insert into #temp
select o.name,i.rows
from sysobjects o,sysindexes i
where o.id=i.id and o.Xtype='U' and i.indid<2
select count(count) 总表数,sum(count) 总记录数 from #temp
select * from #temp order by count desc
set nocount off
转自:/article/5603546.html
相关文章推荐
- SQLSERVER中统计所有表的记录数
- SQLSERVER中统计所有表的记录数
- SQLSERVER中统计所有表的记录数
- SQLSERVER中统计所有表的记录数
- SQLSERVER中统计所有表的记录数
- SQLSERVER中统计所有表的记录数
- SQLSERVER中统计所有表的记录数
- SQLSERVER中统计所有表的记录数
- SQLServer中统计所有表记录数
- SQLSERVER中统计所有表的记录数
- sqlserver 中获取所有有记录的表
- 存储过程实例(统计某用户下所有的表的记录数)
- 一个统计Oracle中所有应用表记录数的例子
- SQL 统计一个数据库中所有表记录的数量
- SqlServer查询数据库所有用户表的记录数
- SqlServer查询数据库所有用户表的记录数
- 简单统计SQLSERVER用户数据表大小(包括记录总数和空间占用情况)
- 统计Oracle当前用户下所有表中的记录数
- VC sqlserver中获取数据库所有表、字段名、记录数据
- 简单统计SQLSERVER用户数据表大小(包括记录总数和空间占用情况)