July 13, 2021

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

About the author 

Kris Wenzel

Kris Wenzel has been working with databases over the past 30 years as a developer, analyst, and DBA. He has a BSE in Computer Engineering from the University of Michigan and a MBA from the University of Notre Dame. Kris has written hundreds of blog articles and many online courses. He loves helping others learn SQL.

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

Are YOU READY TO START LEARNING SQL SERVER, BUT DON'T KNOW WHERE TO START?

Nothing is worse than, being excited to learn a new tool but not knowing where to start, wasting time learning the wrong features, and being overwhelmed .

But it doesn't have to be this way.

I'm Putting together a free email course to help you get started learning SQL Server.

Name*
Email*
>