CREATE TABLE TSTRowCounts(RowCount1 BIGINT,TableName VARCHAR(128))
EXEC sp_MSForEachTable 'INSERT INTO TSTRowCounts
SELECT COUNT_BIG(*) AS RowCount1,
''?'' as TableName FROM ?'
SELECT top 100 TableName, RowCount1 FROM TSTRowCounts ORDER BY RowCount1 DESC
select * from TSTRowCounts
where RowCount1 >100000
No comments:
Post a Comment