MSSQL2005 获取所有表的记录数
SELECT B.NAME, A.ROWCNT FROM SYSINDEXES AS A
LEFT JOIN SYS.OBJECTS AS B ON A.ID = B. OBJECT_ID
WHERE B.TYPE = ' U ' AND A.KEYCNT < 1
ORDER BY A.ROWCNT DESC
MSSQL2005 获取所有表的记录数
SELECT B.NAME, A.ROWCNT FROM SYSINDEXES AS A
LEFT JOIN SYS.OBJECTS AS B ON A.ID = B. OBJECT_ID
WHERE B.TYPE = ' U ' AND A.KEYCNT < 1
ORDER BY A.ROWCNT DESC