Hi All,
Could you guide me on the right way of raising the no_data_found exception if the cursor doesn't return a row, close the cursor, and exit from the loop?
OPEN cursor_name;
LOOP
FETCH cursor_name INTO cursor_rt;
IF cursor_name%NOTFOUND THEN CLOSE cursor_name;
EXIT;
END IF;
RAISE NO_DATA_FOUND
_logic_
EXIT; \_exit\_
EXIT WHEN \_condition\_
END LOOP;
CLOSE cursor_name;