using cursor
Hi all,
I am trying to learn about cursor.
I googled some examples, but I was not able to run those example successfully.
I am getting the error saying:
#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 '' at line 4
The sql script is as follows:
create procedure myCursor()
begin
declare l_emp_name VARCHAR(30);
declare cur_1 cursor for select empName from employee;
open cur_1;
fetch cur_1 into l_emp_name;
close cur_1;
end;
Is there some other things missing?
Thank you for your help
regards
Subject
Views
Written By
Posted
using cursor
4493
June 18, 2010 03:45AM
1647
July 20, 2010 05:35AM
1406
September 15, 2010 11:38AM
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.