Solved

Display Number of Rows Deleted

Posted on 2007-12-05
4
5,582 Views
Last Modified: 2013-12-07
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
Comment
Question by:bskslk
4 Comments
 
LVL 17

Accepted Solution

by:
pssandhu earned 25 total points
ID: 20415452
DBMS_OUTPUT.PUT_LINE(SQL%ROWCOUNT);
0
 
LVL 28

Assisted Solution

by:Naveen Kumar
Naveen Kumar earned 25 total points
ID: 20416145
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Pfile and SPfile - Oracle 2 53
Schema creation in Oracle12c 6 38
Export table into csv file in oracle 10 41
Oracle Listener Not Starting 11 13
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now