Last active
June 18, 2019 11:50
-
-
Save secretorange/2ba92dac83d10bcca0ddb5b334195199 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- TABLE ROW COUNTS | |
SELECT | |
[TableName] = so.name, | |
[RowCount] = MAX(si.rows) | |
FROM | |
sysobjects so, | |
sysindexes si | |
WHERE | |
so.xtype = 'U' | |
AND | |
si.id = OBJECT_ID(so.name) | |
GROUP BY | |
so.name | |
ORDER BY | |
2 DESC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment