Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Display Number of Rows Deleted

Posted on 2007-12-05
4
Medium Priority
?
5,595 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 100 total points
ID: 20415452
DBMS_OUTPUT.PUT_LINE(SQL%ROWCOUNT);
0
 
LVL 28

Assisted Solution

by:Naveen Kumar
Naveen Kumar earned 100 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

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

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.
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows how to recover a database from a user managed backup

704 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