PL/SQL Cursors For Loop
PL/SQL cursor FOR loop has one great advantage of loop continued until row not found. In sometime you require to use explicit cursor with FOR loop instead of use OPEN, FETCH, and CLOSE statement.
FOR loop iterate repeatedly and fetches rows of values from database until row not found.
Explicit Cursor FOR LOOP Example
following one emp_information table:
Display employee number wise first two employee details emp,
EMP_Name: Forbs ross
EMP_Dept: Web Developer
EMP_Name: marks jems
EMP_Dept: Program Developer
PL/SQL procedure successfully completed.