SQL Server Version
Submitted by TimBruce on Thu, 2008-09-04 20:32
There are a variety of ways to determine which version of SQL Server you are running. While the @@version information will tell you the current version
SELECT @@version
SELECT LTRIM(RIGHT(LEFT(@@VERSION,38),9))
The following code will as well, and in a slightly different format:
SELECT 'SQL Server '
+ CAST(SERVERPROPERTY('productversion') AS VARCHAR) + ' - '
+ CAST(SERVERPROPERTY('productlevel') AS VARCHAR) + ' ('
+ CAST(SERVERPROPERTY('edition') AS VARCHAR) + ')'
This will return the data in a slightly different format so you can identify the information related to which type of SQL Server is installed.
