EasyManua.ls Logo

Sybase Adaptive Server Anywhere - Page 510

Sybase Adaptive Server Anywhere
1182 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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

Table of Contents

Related product manuals