sql server 查看表的行数

  SELECT  a.name ,
        b.[rows]
FROM    dbo.sysobjects AS a
        LEFT JOIN sysindexes AS b ON a.id = b.id
WHERE   a.[type] = 'U' AND b.indid IN(0,1) AND [rows]!=0

还有更好的方法        exec     sp_spaceused  'UserRecordDetails'                   !

我被虐爆了 ,愤怒中!

原文地址:https://www.cnblogs.com/bingguang/p/3575048.html