please help me with this "for update of" and "current of" clause in the cursors... though the cursor is able to fetch the records getting an error saying invalid rowid.
DECLARE
CURSOR C_EMP IS SELECT * FROM emp FOR UPDATE OF SAL;--LOCKING MEANS WE CANNOT MAKE ANY CHANGES ON THIS COLUMN WHILE THIS CODE IS RUNNING
BEGIN
FOR R_EMP IN C_EMP LOOP
IF R_EMP.SAL<5000 AND C_EMP%FOUND THEN
UPDATE EMP2 SET SAL=SAL*1.1 WHERE CURRENT OF C_EMP;
END IF;
END LOOP;
END;