What Version of SQL Server Am I Running?

How often do you find yourself thinking “what version of sql server am I running?”. I bet, it happened more than once… If so, you might find this what version of sql server am I running query quite useful:

SELECT substring(@@VERSION,1,26) + ' (' + -- Full SQL Version
+ CAST(SERVERPROPERTY('productversion') AS VARCHAR) + ') - ' -- SQL Version Identifier
+ CAST(SERVERPROPERTY('productlevel') AS VARCHAR) + ' (' -- SQL Service Pack Number
+ CAST(SERVERPROPERTY('edition') AS VARCHAR) + ')' AS [SQL Server Details] -- SQL Version Type

Technorati Tags: , , ,

This entry was posted in SQL and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *