Last active
October 8, 2015 18:11
-
-
Save ewoo/ff4325c9cb2c6b95e139 to your computer and use it in GitHub Desktop.
List SQL tables and their corresponding row counts.
This file contains 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
SELECT sysobjects.Name, sysindexes.Rows | |
FROM sysobjects | |
INNER JOIN sysindexes ON sysobjects.id = sysindexes.id | |
WHERE type = 'U' | |
AND sysindexes.IndId < 2 | |
-- AND sysobjects.name LIKE 'SOMENAME_%' | |
ORDER BY sysindexes.Rows DESC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment