T-SQL 101: 98 Using System Variables and Functions in T-SQL
As well as the variables that you declare, SQL Server has a number of built-in system variables and some built-in system functions.
The system variables are the ones with @@ at the start of their name. Here is an example that’s often used:
SELECT @@VERSION;
It is documented here.
On my SQL Server 2022 system, the value returned is this:

Now while that is a reasonable example of a system variable that has been used for a long time, note that it’s a bit messy as there is a lot of information in a single returned value. There are now better ways to get at the system version in a more useful way:
2025-01-25