Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 5596
  • Last Modified:

Display Number of Rows Deleted

In Oracle 10g PL/SQL, I have a delete statement in a stored procedure.  It is not in a cursor.  I want to see the number of rows I've deleted.  I can use the dbms_output.put_line package. I should know this, but I don't have time to perfect the syntax.  How would I get the number of rows that get deleted and display it via dbms_output.put_lline?
0
bskslk
Asked:
bskslk
2 Solutions
 
pssandhuCommented:
DBMS_OUTPUT.PUT_LINE(SQL%ROWCOUNT);
0
 
Naveen KumarProduction Manager / Application Support ManagerCommented:
But in order to see the output written by dbms_output.put_line(..) , you should set the serveroutput on as shown below :

SQL> SET serveroutput on            -- this command should be run from the sql prompt

Thanks
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now