how to call stored procedure in mysql

Posted by Shanky11 under Others on 8/25/2012 | Points: 10 | Views : 1334 | Status : [Member] | Replies : 2
how to call out parameterized stored procedure in mysql
DROP PROCEDURE IF EXISTS details;
create PROCEDURE detail1
(
IN id int,
OUT sname varchar(50)
)
BEGIN
set sname=(SELECT name FROM student where sid =id);
END
call detail1(3,'sname');




Responses

Posted by: Maheshvishnu on: 8/31/2012 [Member] Starter | Points: 25

Up
0
Down
call detail1(3,@sname)

select @sname;

mahesh

Shanky11, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Shanky11 on: 8/31/2012 [Member] Starter | Points: 25

Up
0
Down
its not working

Shanky11, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response