SQL @@VERSION (Transact SQL)

By: Kris Wenzel   |   Updated: March 6, 2022  
Works With: 

The SQL @@VERSION global variable returns the version of the currently installed SQL server. It includes the SQL server’s system and the build information.

Description

All the details required for upgrade and installations of new features in SQL Server are provided by the @@VERSION function. The information includes SQL Server version, processor architecture, SQL Server build date, SQL Server edition, Operating System version, and a copyright statement.

@@VERSION Usage Notes

Note that @@VERSION is a global variable. The @@ precede global variables.

Syntax

@@VERSION

SQL @@VERSION Examples

The following query returns the information about the installed SQL Server.

SELECT @@VERSION AS 'SQL Server Version Details'
/* Answer */
SELECT @@VERSION AS 'SQL Server Version Details'

The output contains all the information discussed above like SQL Server version, processor architecture (like X64), SQL Server build date, etc.

See Also

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}
>