MySQL Forums
Forum List  »  Stored Procedures

Re: multiple output from store procedure
Posted by: Roberto Novakosky
Date: February 09, 2009 05:13AM

Hi vova,

I am studying about this problem too. The soluction that I found at the moment is the use of temporary tables...

The right code:

declare your output variables ....
declare your input variables...
declare your necesary cursors (to all selects you need)

create your temporary table, you need it to write your all results

open your cursors to do your selects into temporary table

to return multiple rows do :
SELECT your output params from your TempraryTable

drop your temprary table
OK your personalized results ^^


There is a problem with this code because the temporary table is visible to your conncetion, take care if you use multithread in your application, to turn the temporary table visible only to your procedure, call it from one exclusive connection. I dont know yet how to do this without temporary tables, I dont know if is possible with MySQL.

Roberto Novakosky

Options: ReplyQuote

Written By
February 07, 2009 03:58PM
Re: multiple output from store procedure
February 09, 2009 05:13AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.