SQLSERVER 數據庫查看各表的記錄數


 

select   a.name as 表名,max(b.rows) as 記錄條數   from   sysobjects   a   ,sysindexes   b     
  where   a.id=b.id   and   a.xtype='u'   
group   by   a.name   
order by max(b.rows) desc
 

select SUM(記錄條數) as 總記錄數 from(
  select top 10000 a.name as 表名,max(b.rows) as 記錄條數 from sysobjects a ,sysindexes b
  where a.id=b.id and a.xtype='u'
  group by a.name
  order by max(b.rows) desc
) t1


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM