mysql存储过程中定义变量提示语法错误,来高手帮看下,在线等待。。。。。。

declare@Nodebigint,@Personnelbigint,@Permissionsbigint,@LuggageIDbigint,@LuggageTypeb... declare @Node bigint,@Personnel bigint,@Permissions bigint,@LuggageID bigint,@LuggageType bigint,@TargetSite bigint,@TheirCarID bigint,@SourceSite bigint,@SupercargoID bigint,@TransactorID bigint,@MyPersonnelID bigint,@TheirRecordID bigint
set @Node=concat(select ID from datadictionary where Content=MyNode); /*根据网点名称查询*/
set @Personnel=concat(select ID from personnelinformation where StaffName=MyPersonnel); /*根据姓名查询*/
set @Permissions=concat(select ID from datadictionary where Content=MyPermission); /*根据权限查询*/
set @Luggage=concat(select ID from luggageinformation where RFID=(select ID from rfiddictionary CardID=Myluggage));
展开
 我来答
百度网友81ae37efe0
2014-12-16 · TA获得超过159个赞
知道小有建树答主
回答量:239
采纳率:50%
帮助的人:126万
展开全部
兄弟你的问题解决了嘛?

declare var1,var2,.... bigint

set @var1 = '';
select col1 into @var2 from tableName;

为什么我这边执行定义变量就报错
unitech2010
2012-05-25 · TA获得超过1062个赞
知道小有建树答主
回答量:1025
采纳率:100%
帮助的人:909万
展开全部
你把代码贴出来啊!
追问
我叉叉这个网页,他妹的,代码太多了,贴不出来。。
declare @Node bigint,@Personnel bigint,@Permissions bigint,@LuggageID bigint,@LuggageType bigint,@TargetSite bigint,@TheirCarID bigint,@SourceSite bigint,@SupercargoID bigint,@TransactorID bigint,@MyPersonnelID bigint,@TheirRecordID bigint
老是报这点错误。
追答
应该是这样写的吧
不是定义变数错了,应该是对变数的赋值有问题
declare @Node bigint,@Personnel bigint,@Permissions bigint,@LuggageID bigint,@LuggageType bigint,@TargetSite bigint,@TheirCarID bigint,@SourceSite bigint,@SupercargoID bigint,@TransactorID bigint,@MyPersonnelID bigint,@TheirRecordID bigint
declare @Luggage bigint
select @Node=ID from datadictionary where Content=MyNode
select @Personnel=ID from personnelinformation where StaffName=MyPersonnel
select @Permissions=ID from datadictionary where Content=MyPermission
select @Luggage=ID from luggageinformation where RFID in (select ID from rfiddictionary where CardID=Myluggage)
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 1条折叠回答
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式