What is a global variable in sql ?
A global variable is a variable which is having double [at] before variable name.
For example in the following syntax the declared variable is global variable.
declare @@variablename datatype[size] ;
There is no concept of global variables in SQL Server.
In earlier versions of sql server @@somename is usually called as global variables . But these are not actually global variables instead these are system functions . For more read Variables in sql
Back To Top