mysql stored procedure programming

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
yacahuma
Forum Regular
Posts: 870
Joined: Sun Jul 01, 2007 7:11 am

mysql stored procedure programming

Post 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.
Post Reply