Skip to content

Latest commit

 

History

History
96 lines (63 loc) · 3.62 KB

version-transact-sql-configuration-functions.md

File metadata and controls

96 lines (63 loc) · 3.62 KB
title description author ms.author ms.reviewer ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs monikerRange
@@VERSION (Transact-SQL)
@@VERSION - Transact SQL Configuration Functions
MikeRayMSFT
mikeray
maghan
09/25/2024
sql
t-sql
reference
@@VERSION
@@VERSION_TSQL
sql13.swb.tsqlquery.f1
@@VERSION function
current SQL Server installation information
versions [SQL Server], @@VERSION
processors [SQL Server], types
TSQL
>=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 [!INCLUDE ssNoVersion].

:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions

Important

The [!INCLUDE ssDE-md] version numbers for [!INCLUDE ssNoVersion] and [!INCLUDE ssazure-sqldb] are not comparable with each other, and represent internal build numbers for these separate products. The [!INCLUDE ssDE-md] for [!INCLUDE ssazure-sqldb] is based on the same code base as the [!INCLUDE ssDEnoversion]. Most importantly, the [!INCLUDE ssDE-md] in [!INCLUDE ssazure-sqldb] always has the newest SQL [!INCLUDE ssDE-md] bits. For example, version 12 of [!INCLUDE ssazure-sqldb] is newer than version 16 of [!INCLUDE ssNoVersion].

Syntax

@@VERSION

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 [!INCLUDE ssNoVersion], the following information is returned.

  • [!INCLUDE ssNoVersion] version

  • Processor architecture

  • [!INCLUDE ssNoVersion] build date

  • Copyright statement

  • [!INCLUDE ssNoVersion] edition

  • Operating system version

For [!INCLUDE ssazure-sqldb] and [!INCLUDE ssazuremi-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 [!INCLUDE ssNoVersion]

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

SELECT @@VERSION AS 'SQL Server Version';

Examples: [!INCLUDE ssazuresynapse-md] and [!INCLUDE ssPDW]

B. Return the current version of [!INCLUDE ssazuresynapse-md]

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

Related content