MySQL Forums
Forum List  »  Oracle

equivalent of for <record> in <cursor> loop....end loop;
Posted by: corne lombard
Date: March 14, 2006 06:15AM

In Oracle, we can do

for <record> in <cursor> (parameter1, parameter 2)
loop


end loop;

Is this the best solution for mysql 5.0 ?

open <cursor> (parameters allowed here ????);
repeat
fetch <cursor> into <variable1, variable2>;
If not done then

end if;
until done end repeat;
close <cursor>


Corne
OCP

The line ' If not done then ', does this check equates to check for more records in cursor ?

Thanks



Edited 1 time(s). Last edit at 03/14/2006 06:19AM by corne lombard.

Options: ReplyQuote


Subject
Views
Written By
Posted
equivalent of for <record> in <cursor> loop....end loop;
4263
March 14, 2006 06:15AM


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.