error calling nested stored procedures mysql
I m calling a stored procedure inside another stored procedure in MySQL
The error i m getting on calling simply using Mysql administrator
call sp_update_back_image(2, 3);
is: -
OUT or INOUT argument 2 for routine void.sp_sel_opti开发者_如何转开发ons_id is not a variable
or NEW pseudo-variable in BEFORE trigger
The stored procedures...
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_update_back_image`(uid int , img_id int)
BEGIN
call sp_sel_options_id(uid, oid);
select oid;
END
The sp_sel_options_id is: -
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_sel_options_id`(IN uid int,
OUT r_id int)
BEGIN
set r_id = 0;
END
Any Help
Thanks
Pradyut
India
yup
the other variable needs to initialized or ordered in the calling variables...
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_update_back_image`(uid int , img_id int)
BEGIN
declare oid int;
call sp_sel_options_id(uid, oid);
select oid;
END
精彩评论