Mega Code Archive

 
Categories / Oracle PLSQL / Cursor
 

Demonstrates the %ROWCOUNT cursor attribute by using a single-row implicit cursor based on the DUAL pseudotable

SQL> SQL> DECLARE   2    n NUMBER;   3  BEGIN   4    SELECT 1 INTO n FROM dual;   5    dbms_output.put_line('Selected ['||SQL%ROWCOUNT||']');   6  END;   7  / Selected [1] PL/SQL procedure successfully completed.