SQL server 查询当前数据库所有表的行数

SELECT    OBJECT_NAME(ii.id) TableName  ,rows
FROM    sysindexes ii 
INNER JOIN sysobjects oo 
ON ( oo.id = ii.id
     AND oo.xtype = 'U ')
WHERE   ii.indid < 2
ORDER BY rows desc ; 

 

posted @ 2020-08-18 15:37  LuckinAaron  阅读(1225)  评论(0编辑  收藏  举报