我有一个存储的过程,它被设计为
OUT id
INOUT name
IN password
OUT activate
我想检索值 id、名称、活动。
当我这样做时
CALL login(@id,'abc','abc',@activate);
select @id as rm_out_param, @activate as active_out_param,@name as uname;
它向我显示一个错误
OUT or INOUT argument 2 is not a variable
当我尝试使用
CALL login(@id,@name,'abc','abc',@activate);
select @id as rm_out_param, @activate as active_out_param,@name as uname;
它向我显示错误
Invalid arguments supplied expected 4,5 given
如何克服此问题以获得结果输出为 id、名称、活动
谢谢,非常感谢
我有一个存储的过程,它被设计为
OUT id INOUT name IN password OUT activate
由于上述三个参数是OUT
类型。因此,您必须传递变量来代替它们,而不是任何值或字符串文字。
因此,您应该在此处调用该过程:
SET @name := 'abc';
CALL login(@id,@name,'abc',@activate);
select @id as rm_out_param, @activate as active_out_param,@name as uname;