Skip to content

Latest commit

 

History

History
93 lines (62 loc) · 3.84 KB

File metadata and controls

93 lines (62 loc) · 3.84 KB
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
@@VERSION
@@VERSION_TSQL
helpviewer_keywords
@@VERSION function
current SQL Server installation information
versions [SQL Server], @@VERSION
processors [SQL Server], types
dev_langs
TSQL
monikerRange >= aps-pdw-2016 || = azuresqldb-current || = azure-sqldw-latest || >= sql-server-2016 || >= sql-server-linux-2017 || = azuresqldb-mi-current

@@VERSION - Transact SQL Configuration Functions

[!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].

Syntax

@@VERSION  

[!INCLUDEsql-server-tsql-previous-offline-documentation]

Return Types

nvarchar

Remarks

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.

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

Examples

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';  

See Also

SERVERPROPERTY (Transact-SQL)