CREATE TABLE temp (TableName VARCHAR (255), RowCnt INT)
EXEC sp_MSforeachtable 'INSERT INTO temp SELECT ''?'',COUNT(*) FROM ?'
SELECT TableName, RowCnt FROM temp ORDER BY TableName
DROP TABLE temp

 

posted on 2019-09-20 11:16  淡淡-祥  阅读(216)  评论(0编辑  收藏  举报