PROGRAM TO COUNT THE NUMBER OF UPDATED RECORDS IN ORACLE?



SQL> DECLARE
  2  SALARY EMP.SAL%TYPE;
  3  BEGIN
  4  UPDATE EMP SET SAL=SAL+100;
  5  DBMS_OUTPUT.PUT_LINE(SQL%ROWCOUNT||'RECORDS  
      UPDATED');
  6  END;
  7  /

15 RECORDS UPDATED

PL/SQL procedure successfully completed.


SQL> @ UPDATE.SQL;
15 RECORDS UPDATED

PL/SQL procedure successfully completed.

Comments

Popular posts from this blog

Write a program to add two number using inline function in C++?

Traversing of elements program with algorithm and Flowchart