• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 5597
  • 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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