MySQL Forums
Forum List  »  Stored Procedures

Accessing returned resultsets from nested stored procs
Posted by: Syed Hashmi
Date: May 27, 2010 11:44AM

I have one Stored Proc call another nested Stored Proc. The nested Stored Proc returns a result set. Can anyone share a code snippet on how to access the returned resultset in the Caller Stored Proc and loop over that. I am trying to do it without any temporary tables involved.

Call ChildStoredProc(var1);

CREATE PROCEDURE ChildStoredProc (
IN var1 INT UNSIGNED
)
BEGIN
SELECT * FROM tablename WHERE FK = var1;
END;



Edited 1 time(s). Last edit at 05/30/2010 04:33PM by Syed Hashmi.

Options: ReplyQuote


Subject
Views
Written By
Posted
Accessing returned resultsets from nested stored procs
2134
May 27, 2010 11:44AM


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.