MySQL Forums
Forum List  »  InnoDB

Return Multi rows by cursor
Posted by: Abdullah Alharbi
Date: January 26, 2009 10:30AM

Hi ,
I need to return multi rows by param cursor.
I write this
-------------------
DROP PROCEDURE IF EXISTS `aa`.`new`$$

CREATE PROCEDURE `afaq`.`new`(out rec cursor)
BEGIN
open rec for 'select acc_id,acc_name from ACCOUNTS ' ;
END$$

DELIMITER ;
---------------------

Return this error

Error Code : 1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CURSOR)
BEGIN
open rec for 'select acc_id,acc_name from ACCOUNTS ' ;
END' at line 1
(0 ms taken)

Options: ReplyQuote


Subject
Views
Written By
Posted
Return Multi rows by cursor
5309
January 26, 2009 10:30AM
2869
January 26, 2009 11:59AM
2745
January 26, 2009 01:27PM


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.