jestges
jestges

Reputation: 3740

Difference between set @flag =1 and set @@flag = 1

What is the difference between

set @flag=1 and set @@flag = 1 in SQL Server?

Upvotes: 5

Views: 1004

Answers (1)

Daniel Vassallo
Daniel Vassallo

Reputation: 344481

Nothing. Some in-built functions have names that start with double at signs @@ as a convention. To avoid confusion it is often recommended that you do not use names that start with @@.

Source: MSDN: Using Identifiers - Rules for Regular Identifiers.

Upvotes: 7

Related Questions