方法一:
select a.name,b.rows from sysobjects as a,sysindexes as b where a.type='u' and a.id=b.id and b.indid in(0,1) order by b.rows desc
方法二:
CREATE TABLE #temp (TableName VARCHAR (255), RowCnt INT) EXEC sp_MSforeachtable 'INSERT INTO #temp SELECT ''?'', COUNT(*) FROM ?' select * from #temp order by RowCnt desc DROP TABLE #temp
posted on
浙公网安备 33010602011771号