What is the meaning of the symbol @@
in SQL Server?
In SQL Server, symbol @@ is prefixed to global variables. The server maintains all the global variables.
After an INSERT, SELECT INTO, or bulk copy statement is completed, @@IDENTITY contains the last identity value that is generated by the statement. If the statement did not affect any tables with identity columns, @@IDENTITY returns NULL.
Using @@ERROR to conditionally exit a procedure. The following example uses IF...ELSE statements to test @@ERROR after an DELETE statement in a stored procedure. The value of the @@ERROR variable determines the return code sent to the calling program, indicating success or failure of the procedure.
There is no difference. The rules for variables state that they start with an '@' character and follow the rules for identifiers.
In SQL Server, symbol @@
is prefixed to global variables.
The server maintains all the global variables. We cannot declare them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With