| title | @@VERSION (Transact-SQL) | ||||
|---|---|---|---|---|---|
| description | @@VERSION - Transact SQL Configuration Functions | ||||
| author | MikeRayMSFT | ||||
| ms.author | mikeray | ||||
| ms.date | 06/20/2023 | ||||
| ms.service | sql | ||||
| ms.subservice | t-sql | ||||
| ms.topic | reference | ||||
| f1_keywords |
|
||||
| helpviewer_keywords |
|
||||
| dev_langs |
|
||||
| monikerRange | >= aps-pdw-2016 || = azuresqldb-current || = azure-sqldw-latest || >= sql-server-2016 || >= sql-server-linux-2017 || = azuresqldb-mi-current |
[!INCLUDE sql-asdb-asdbmi-asa-pdw]
Returns system and build information for the current installation of [!INCLUDEssNoVersion].
:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions
Important
The [!INCLUDEssDE-md] version numbers for [!INCLUDEssNoVersion] and [!INCLUDE ssazure-sqldb] are not comparable with each other, and represent internal build numbers for these separate products. The [!INCLUDEssDE-md] for [!INCLUDE ssazure-sqldb] is based on the same code base as the [!INCLUDEssDEnoversion]. Most importantly, the [!INCLUDEssDE-md] in [!INCLUDE ssazure-sqldb] always has the newest SQL [!INCLUDEssDE-md] bits. For example, version 12 of [!INCLUDE ssazure-sqldb] is newer than version 16 of [!INCLUDEssNoVersion].
@@VERSION
[!INCLUDEsql-server-tsql-previous-offline-documentation]
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 [!INCLUDEssNoVersion], the following information is returned.
-
[!INCLUDEssNoVersion] version
-
Processor architecture
-
[!INCLUDEssNoVersion] build date
-
Copyright statement
-
[!INCLUDEssNoVersion] edition
-
Operating system version
For [!INCLUDE ssazure-sqldb] and [!INCLUDE sssdsmifull-md], the following information is returned.
-
Edition- "Microsoft SQL Azure"
-
Product level- "(RTM)"
-
Product version
-
Build date
-
Copyright statement
A: Return the current version of [!INCLUDEssNoVersion]
The following example shows returning the version information for the current installation.
SELECT @@VERSION AS 'SQL Server Version'; Examples: [!INCLUDEssazuresynapse-md] and [!INCLUDEssPDW]
B. Return the current version of [!INCLUDEssazuresynapse-md]
SELECT @@VERSION AS 'SQL Server PDW Version';