Wednesday, February 2, 2011

Implicit Cursor - SQL%ROWCOUNT attribute

An implicit cursor can tell you how many row were affected by an update statement.

SET SERVEROUTPUT ON
BEGIN
  UPDATE emp SET sal = sal * 1.05;
  DBMS_OUTPUT.PUT_LINE('No. of records updated : ' ||SQL%ROWCOUNT);
END;
anonymous block completed
No. of records updated : 14

No comments:

Post a Comment

External Table

Oracle External Table External tables are defined as tables that do not resides in the database allows you to access data that is stor...