Oracle Cursors

Created 11 January 2006 00:00
  PROCEDURE my_proc IS
    CURSOR mytable_cur IS
      SELECT id
      FROM   mytable
      WHERE  status = 1;
  
  BEGIN
  
    FOR mytable_rec IN mytable_cur LOOP
      -- do whatever
    END LOOP;
  
  END my_proc;