Caveman's Blog

My commitment to learning.

Sql Server: How to find the current version?

with one comment


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:

1. Microsoft support
2. Microsoft SQL Server

Advertisements

Written by cavemansblog

July 7, 2009 at 6:46 pm

One Response

Subscribe to comments with RSS.

  1. […] 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 […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: