Use of @ in sql statements or in declaring variables?
Is there anyone who told me what is开发者_运维知识库 the use of @ in sql statements specially while declaring variables in sql query......thnx for any response.
It's kind of hard to Google for an @ sign isn't it?
Here's a link to SQL Server help on this, where it says:
Variable names must begin with an at (@) sign.
And here's a link about declaring variables in PL-SQL, where they are not preceded by the @ sign.
So, it depends on which particular database you're using.
It is used to declare variables. For example:
Declare @SubID varchar(20)
Declare @MyTable Table
(
Column1 int
)
精彩评论