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

  

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章