CREATE TABLE #temp (TableName VARCHAR (255), RowCnt INT)
EXEC sp_MSforeachtable 'INSERT INTO #temp SELECT ''?'', COUNT(*) FROM ?'
SELECT TableName, RowCnt FROM #temp ORDER BY RowCnt desc
DROP TABLE #temp
数据库查询所有表的记录数
最新推荐文章于 2025-06-16 18:27:51 发布