Do You Want to Learn SQL?

Take our free eight day course, where I'll teach you in simple to understand English all you need to get started learning SQL.

-
DAYS
-
HOURS
-
MINUTES
-
SECONDS

Free Beginners SQL Course!

SQL @@VERSION (Transact SQL)

·

·

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

More from the blog


MySQL PostgreSQL SQLite SQL Server