DECLARE CURSOR c1 IS SELECT empid,ename FROM emp; id emp.empid%TYPE; name emp.ename%TYPE; counter NUMBER; BEGIN counter:=0; OPEN c1; LOOP FETCH c1 INTO id,name EXIT WHEN c1%NOTFOUND; counter := c1%ROWCOUNT; DBMS_OUTPUT.PUT_LINE(' Rows processed: '||counter); END LOOP; CLOSE c1; END; /Other cursor attributes include %FOUND and %ISOPEN.
Dig Deeper on Oracle database design and architecture
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.