Last active
March 16, 2018 12:54
-
-
Save amimaro/a49875998a36847c87c60d477ff88eb6 to your computer and use it in GitHub Desktop.
Some MSSQL Queries
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
-- Query count rows from tables | |
SELECT T.name AS tableName, | |
I.rows AS rowCount | |
FROM sys.tables AS T | |
INNER JOIN sys.sysindexes AS I | |
ON T.object_id = I.id | |
AND I.indid < 2 | |
ORDER BY I.rows DESC |
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
Some MSSQL Queries |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment