Confused by SQL Server Version Numbers?


Here is a nice picture of all the version numbers, now I still see a bunch of folks who are confused by the info that comes out of SQL Server in terms of versions, so try running the following script;


set nocount on


select @@version


select 'Edition: ' + convert(char(30), serverproperty('Edition'))


select 'Product Version: ' + convert(char(20), serverproperty('ProductVersion'))


select 'Product Level: ' + convert(char(20),serverproperty('ProductLevel'))


set nocount off



The answer for my RTM instance looks like this;


Microsoft SQL Server 2005 - 9.00.1399.06 (Intel X86)

Oct 14 2005 00:33:37

Copyright (c) 1988-2005 Microsoft Corporation

Developer Edition on Windows NT 5.2 (Build 3790: Service Pack 2)


Edition: Developer Edition


Product Version: 9.00.1399.06


Product Level: RTM

The piece of data that confused most people is the part I have highlighted orange, this is the NT Service Pack Level, not the SQL Service Pack level. Part of the reason that folks jump to the conclusion is that the basic information in the first query is very detailed but the one piece it is really missing is the SP level :-) This can be retrieved by using Product Level instead.


Update: Changed the Char(20) to a Char(30) per the comments for Edition