In this post explains how to use the @@VERSION function in SQL Server (Transact-SQL) with syntax and examples.
In SQL Server (Transact-SQL), the @@VERSION function returns the version of the SQL Server database, including the system and build information.
The syntax for the @@VERSION function in SQL Server (Transact-SQL) is:
@@VERSION
There are no parameters or arguments for the @@VERSION function.
The @@VERSION function can be used in the following versions of SQL Server (Transact-SQL):
Let's look at an example and explore how to use the @@VERSION function in SQL Server (Transact-SQL).
For example:
SELECT @@VERSION;
Since the @@VERSION function returns the current version of the SQL Server database, it might display something like this:
SELECT @@VERSION;
Output: 'Microsoft SQL Server 2014 (SP2-GDR) (KB4019093) - 12.0.5207.0 (X64)'
In this example: