必须声明标量变量@NAME [英] Must declare the scalar varible @NAME
本文介绍了必须声明标量变量@NAME的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我收到以下错误必须声明标量变量@NAME"
我的代码为
从示例中选择*,其中Staff.Name=@NAME
帮助pl
Praveen
Hello All,
I get the following error "Must declare the scalar variable @NAME"
my code as
select * from sample where Staff.Name=@NAME
Help pl
Praveen
推荐答案
@Name是一个参数,如果您使用存储过程,则需要传递该参数;如果您直接在查询中使用此参数,则需要设置该参数.
您需要定义并设置 [
@Name is a parameter that needs to be passed in if you are using a stored procedure or set if you are directly using this in a query.
You need to define and set[^] the local variable somewhere before your query.
从示例中选择*,其中Staff.Name=@NAME
如果您在提供@name之前必须先给出
@name varchar(max)
从样本中选择*
其中Staff.Name=@NAME
如果该答案对您有帮助,请不要忘记接受作为答案或投票.
select * from sample where Staff.Name=@NAME
if you give @name before you must give
@name varchar(max)
select * from sample
where Staff.Name=@NAME
If This answer helps you, please dont forget to accept as answer or vote.
这篇关于必须声明标量变量@NAME的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文