开发者

Use of @ in sql statements or in declaring variables?

开发者 https://www.devze.com 2023-03-19 14:23 出处:网络
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 @ si

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
)
0

精彩评论

暂无评论...
验证码 换一张
取 消