Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Applies to:
SQL Server
Azure SQL Database
Azure SQL Managed Instance
Azure Synapse Analytics
Analytics Platform System (PDW)
SQL analytics endpoint in Microsoft Fabric
Warehouse in Microsoft Fabric
SQL database in Microsoft Fabric
Returns system and build information for the current installation of SQL Server.
Transact-SQL syntax conventions
Important
The Database Engine version numbers for SQL Server and Azure SQL Database are not comparable with each other, and represent internal build numbers for these separate products. The Database Engine for Azure SQL Database is based on the same code base as the SQL Server Database Engine. Most importantly, the Database Engine in Azure SQL Database always has the newest SQL Database Engine bits. For example, version 12 of Azure SQL Database is newer than version 16 of SQL Server.
@@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 and Azure SQL Managed Instance, the following information is returned.
Edition- "Microsoft SQL Azure"
Product level- "(RTM)"
Product version
Build date
Copyright statement
The following example shows returning the version information for the current installation.
SELECT @@VERSION AS 'SQL Server Version';
SELECT @@VERSION AS 'SQL Server PDW Version';
Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register today