MySQL Forums
Forum List  »  InnoDB

Cursor syntax rejected 5.0.67
Posted by: Malcolm Needham
Date: December 17, 2008 12:45PM

Newbie question. I am trying to declare a cursor like this:

DECLARE cur1 CURSOR FOR SELECT * FROM work_flights ;

And it is getting rejected in MySQL Query Browser with this message:

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 'DECLARE cur1 CURSOR FOR SELECT * FROM work_flights' at line 1

Initially I tried it in a long stored procedure and got this message. So I extracted it into MySQL Query and same thing.

Probably something obvious - that's the way it is at my present position at the bottom of the learning curve:)

Options: ReplyQuote


Subject
Views
Written By
Posted
Cursor syntax rejected 5.0.67
4061
December 17, 2008 12:45PM


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.