Page 1 of 1

mysql stored procedure programming

Posted: Sun Apr 13, 2008 5:26 pm
by yacahuma
I need a good tutorial on mysql SP programming. I have
MySQL Stored Procedure Programming book. But I still have very simple questions.

For example if I have an SP like the following


select id into my_id from ..... where ....

if id is found then
insert into another table(my_id)
else
set out_status='F'
set out_status_code = 'E_ID_NOT FOUND'
end if;


basically I want to know what is the best way to find not found situations when wrting mysql SP

Thank you

Is this the only way to do this? You can imagine what happen if you have a bunch of this selects.


I have oreally safari books online. So if someone knows a good book title let me know, it might be there.