@@VERSION - Transact SQL Configuration Functions
Applies to: SQL Server (all supported versions) Azure SQL Database Azure SQL Managed Instance Azure Synapse Analytics Analytics Platform System (PDW)
Returns system and build information for the current installation of SQL Server.
We are aware of an issue where the product version reported by @@VERSION is incorrect for Azure SQL Database, Azure SQL Managed Instance and Azure Synapse Analytics.
The version of the SQL Server database engine run by Azure SQL Database, Azure SQL Managed Instance and Azure Synapse Analytics is always ahead of the on-premises version of SQL Server, and includes the latest security fixes. This means that the patch level is always on par with or ahead of the on-premises version of SQL Server, and that the latest features available in SQL Server are available in these services.
To programmatically determine the engine edition, use SELECT SERVERPROPERTY('EngineEdition'). This query will return '5' for Azure SQL Database, '8' for Azure SQL Managed Instance, and '6' or '11' for Azure Synapse.
We will update the documentation once this issue is resolved.
To view Transact-SQL syntax for SQL Server 2014 and earlier, see Previous versions documentation.
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
SQL Server build date
SQL Server edition
Operating system version
For Azure SQL Database and Azure SQL Managed Instance, the following information is returned.
Edition- "Microsoft SQL Azure"
Product level- "(RTM)"
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';
Examples: Azure Synapse Analytics and Analytics Platform System (PDW)
B. Return the current version of Microsoft Azure Synapse Analytics
SELECT @@VERSION AS 'SQL Server PDW Version';
Submit and view feedback for