Last active
June 20, 2019 00:01
-
-
Save brazilnut2000/5260446 to your computer and use it in GitHub Desktop.
SQL: Detect SQL Server Version
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 | |
CASE @@microsoftversion/ 0x01000000 | |
WHEN 6 THEN 'You''ve got to be kidding me.' | |
WHEN 7 THEN 'SQL Server 7.0' | |
WHEN 8 THEN 'SQL Server 2000' | |
WHEN 9 THEN 'SQL Server 2005' | |
WHEN 10 THEN 'SQL Server 2008' | |
WHEN 11 THEN 'SQL Server 2012' | |
WHEN 12 THEN 'Time to update your gist, homey.' | |
END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment