Sql Server: How to find the current version?
Posted by cavemansblog on July 7, 2009
One of the following two SQL queries could be used to determine the current version of the Microsoft SQL Server [2] that you are working on. I like the first method, for the simplicity of its usage.
SELECT @@version
--OUTPUT
--Microsoft SQL Server 2005 - 9.00.XXXX.00
--Nov XX 200X 16:17:31
--Copyright (c) 1988-2005 Microsoft Corporation
--XXXXXX Edition on Windows NT 5.2 (Build XXXX: Service Pack X)
-------
--OR--
-------
SELECT SERVERPROPERTY('productversion') productversion,
SERVERPROPERTY ('productlevel') Product Level,
SERVERPROPERTY ('edition')
--OUTPUT
--Product Version Product Level Edition
----------------- -------------- --------------
--9.00.XXXX.00 SPX XXXXX Edition
Following are the product versions and their corresponding names.
8.0 stands for SQL Server 2000
9.0 stands for SQL Server 2005
10.0 stands for SQL Server 2008
Tip: You can run select @@servername in management studio query editor to find the SQL Server name.
References:

Video | Enjolt.com | Innovate for Success said
[...] Ultimate. Of course the fact that there are 6 versions of Windows 7 (and Vista too) and only Sql Server: How to find the current version? – cavemansblog.wordpress.com 07/07/2009 One of the following two SQL queries could be used to [...]