MySQL Forums
Forum List  »  Stored Procedures

Re: How can I return multiple rows in a stored procedure with Connector/J
Posted by: Andrew Gilfrin
Date: April 01, 2005 01:44AM

It's not currently possible to return multiple rows from stored procedures or functions via out parameters or returns. You limited to the same data types as used in columns and hence single values at a time.

What you can do is simply call the SQL within the procedure itself, so rather than using a cursor you just call the SQL as you would on the command line.

If you working with the command line the SQL will be run just as if you have called it directly. I have done some work with PHP to handle this which can be found here http://mysql.gilfster.com/php/introduction.php take a look at the second example. This won't be of direct use to you as your using java but it might give you some pointers.

Andrew Gilfrin
------------------
http://gilfster.blogspot.com
My MySQL related Blog

http://www.mysqldevelopment.com
MySQL Stored Procedure,Trigger, View.... (Just about most things these days) Information

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: How can I return multiple rows in a stored procedure with Connector/J
9184
April 01, 2005 01: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.