TechNet
Export (0) Print
Expand All

@@VERSION (Transact-SQL)

 

THIS TOPIC APPLIES TO: yesSQL Server (starting with 2008)yesAzure SQL DatabaseyesAzure SQL Data Warehouse yesParallel Data Warehouse

Returns system and build information for the current installation of SQL Server.

Topic link icon Transact-SQL Syntax Conventions

-- Syntax for SQL Server, Azure SQL Database, Azure SQL Data Warehouse, Parallel Data Warehouse  
  
@@VERSION  

nvarchar

The @@VERSION results are presented as one nvarchar string. You can use the SERVERPROPERTY (Transact-SQL) function to retrieve the individual property values.

For SQL Server, the following information is returned.

  • SQL Server version

  • Processor architecture

  • SQL Server build date

  • Copyright statement

  • SQL Server edition

  • Operating system version

For Azure SQL Database, the following information is returned.

  • Edition- "Windows Azure SQL Database"

  • Product level- "(CTP)" or "(RTM)"

  • Product version

  • Build date

  • Copyright statement

A: Return the current version of SQL Server

The following example shows returning the version information for the current installation.

SELECT @@VERSION AS 'SQL Server Version';  

B. Return the current version of SQL Data Warehouse

SELECT @@VERSION AS 'SQL Server PDW Version';  

SERVERPROPERTY (Transact-SQL)

Community Additions

ADD
Show:
© 2016 Microsoft