CLOSE Example
The following example illustrates cursor processing from cursor declaration to closing:
EXEC SQL DECLARE c1 CURSOR FOR
SELECT ename, jobid
FROM employee
WHERE jobid = 1000;
...
EXEC OPEN c1;
LOOP UNTIL NO MORE ROWS;
EXEC SQL FETCH c1
INTO :name, :jobid;
PRINT NAME, jobid;
END LOOP;
EXEC SQL CLOSE c1;
Last modified date: 11/09/2022