Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 What is the meaning of @@ in sql

Author  Topic 

krishna_yess
Yak Posting Veteran

81 Posts

Posted - 2011-07-08 : 12:51:32
I came across this @@ in many places, is there are a special meaning to it or its convention?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-07-08 : 12:58:22
It means it's a global variable.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2011-07-08 : 13:57:58
To be clear, it's actually a system function. (sorry Tara)

quote:
The names of some Transact-SQL system functions begin with two at signs (@@). Although in earlier versions of Microsoft SQL Server, the @@functions are referred to as global variables, they are not variables and do not have the same behaviors as variables. The @@functions are system functions, and their syntax usage follows the rules for functions.


http://msdn.microsoft.com/en-us/library/ms187953.aspx
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-07-08 : 14:44:12
Okay, Celko.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2011-07-08 : 19:23:06
Ohhhh, you are a cruel one. lol.
Go to Top of Page
   

- Advertisement -