Solved

Display Number of Rows Deleted

Posted on 2007-12-05
4
5,594 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
Suggested Courses

632 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