Buy Questpond's video subscriptions on
huge discount
.
Online: 3575
Home
Articles
Interviews
Forums
For Beginners
Popular Questions
ITIL Career Advice
PMP Career Advice
Career Advices
Codes
Videos
ASP.NET
ASP.NET MVC
Android Intel XDK
Sql Server
AngularJS
Bootstrap
Backbone.JS
MongoDB
LESS (CSS)
jQuery
WPF
WWF
SSIS
LightSwitch
Tutorials
News
ASP.NET MVC
|
Be Interview Ready
|
Top Performers
|
DNF MVP
|
Top Posts
|
Winners
|
Subscribe
|
Catalogs
Welcome Guest !
Register
Login
Home
>
Forums
>
Sql Server
>
Loading ...
What is the difference between @@ and @ in sql server? [Resolved]
Posted by
Vivekjj
under
Sql Server
on 10/5/2012 |
Points: 10
| Views : 11549 | Status :
[Member]
| Replies : 5
Write New Post
|
Search Forums
|
Resolved Posts
|
Un Answered Posts
|
Forums Home
any one can say wat is the difference between @@ and @
[Resolved]
Reply
|
Reply with Attachment
Alert Moderator
Responses
Posted by:
Vasanthmvp
on: 10/16/2012
[Member]
Starter
|
Points: 50
0
Hi,
@variablename is a variable to hold some value depending on its type and range.
@@ refers to a function name.We have some system functions defined in sql server.. they perform operations on and return information about values, objects, and settings in SQL Server.
Eg: @@ERROR
@@IDENTITY
@@PACK_RECEIVED
@@ROWCOUNT
@@TRANCOUNT
To know about the above functions in detail refer :
http://technet.microsoft.com/en-us/library/ms187786.aspx
Awesome Coding !! :)
Vivekjj
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Pgayath
on: 10/5/2012
[Member]
Starter
|
Points: 25
0
hi Vivekjj,
Prior to SQL Server 2008, @ denotes a local variable and @@ denotes a global variable.
In SQL 2008, @@ refers to a function name and hence cannot be used for a parameter name.
Thanks and Regards,
Gayathri P
Vivekjj
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Sourabh07
on: 10/16/2012
[Member]
Starter
|
Points: 25
0
hi ,
@@ represents the global variables i.e. used for the system functions in the SQL
and @ represents the local variable
eg:
1) Declare @id int (local variable)
2) @@identity , @@RowCount and many more (global variables)
Sourabh07
Vivekjj
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Vivekjj
on: 10/30/2012
[Member]
Starter
|
Points: 25
0
Thanks for ur reply it very helpful
Vivekjj
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Posted by:
Vasanthmvp
on: 10/30/2012
[Member]
Starter
|
Points: 25
0
Hi vivekjj, if it is helpful to you please mark it as answer.. it would be helpful to others.
Regards,
Awesome Coding !! :)
Vivekjj
, if this helps please
login
to
Mark As Answer
. |
Alert Moderator
Login to post response
Latest Posts
How to get the exact property name while getting error
(0)
PDB file is not showing Line Number in dot net application hosted on server
(0)
Both Strings morethan 5 letters in length end of the words one vowel and one consonent is different
(0)
how to check Any adjacent letters transposed between two strings(ex: JOHN, JHON)
(1)
can't receive data after success login ?
(1)
Implement Multi-Tenant in Azure Logic Apps
(0)
Why ASP.Net Core 7.0 Web API showing as Connection refused?
(0)
Iterating over columns of dataframe and print as rows in Python Django
(0)
More ...