Created
September 30, 2016 23:52
-
-
Save digioz/78ae871d979ca6e58a7a1a29527f872d to your computer and use it in GitHub Desktop.
Get a row count in all table microsoft sql database
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
sp_MSForEachTable 'DECLARE @t AS VARCHAR(MAX); | |
SELECT @t = CAST(COUNT(1) as VARCHAR(MAX)) | |
+ CHAR(9) + CHAR(9) + ''?'' FROM ? ; PRINT @t' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment