查询一个数据库中所有表的记录数

with TableRecord(TableName,RecordCount) as
(  
  select o.name,i.rows  
  from sysobjects o,sysindexes i    
  where o.id=i.id and o.Xtype='U' and i.indid<2 

 
select * from TableRecord  order by tablename

posted @ 2013-04-11 14:37  夕阳茶  阅读(229)  评论(0编辑  收藏  举报