Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

store procedure result problem

Status
Not open for further replies.

boske3

Programmer
Mar 11, 2006
20
RS
Hi everyone
I have a problem.I try to execute procedure like this one:
****************************************
drop procedure sp_out;
SET @x='Molweni';
CREATE PROCEDURE sp_out(OUT p VARCHAR(10)) SET P='molo';
CALL sp_out(@x);
SELECT @x;

****************************************

and i expected result like this : @x: molo
but i dont got it i have result like this : @x: null
and i dont now why.

I use MySQL 5.0 and i use MySQL Query Browser 1.1.20
for this.I execute this code from Query Browser
and i got @x: null as result
but when i use command prompt i got result as i wish: @x: molo

Why i cant have this result in Query Browser
Can anyone now the reason?or have a solution
Thanks
 
Hi there..

try this:

Code:
CREATE PROCEDURE sp_out(OUT p VARCHAR(10)) 
BEGIN 
SET P='molo';
SELECT P;
END;

Nick
 
Hi thanks for help
this works i try this in my query browser and it works

delimiter |
CREATE PROCEDURE sp_out(OUT p VARCHAR(10))
BEGIN
SET P='molo';
SELECT P;
END;
|

CALL sp_out(@x)


Thanks a lotfor help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top