DECLARE CURSOR statement [ESQL] [SP]
492
♦
The following example illustrates the use of cursors in a stored
procedure:
BEGIN
DECLARE cur_employee CURSOR FOR
SELECT emp_lname
FROM employee;
DECLARE name CHAR(40);
OPEN cur_employee;
LOOP
FETCH NEXT cur_employee INTO name;
...
END LOOP
CLOSE cur_employee;
END
Need help?
Do you have a question about the Adaptive Server Anywhere and is the answer not in the manual?
Questions and answers