查询当前数据库中所有表名 以及表对应的行数

select "表名"= convert (varchar (50), o.name), "行数"=i.rows
from sysobjects o (nolock), sysindexes i (nolock)
where o.type = 'U' and o.id = i.id and i.indid in (0,1)
order by rows desc ,o.name

posted @ 2012-09-19 15:46  失忆的烟  阅读(244)  评论(0编辑  收藏  举报