Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

DML statement output within PL/SQL block

user13541937Mar 31 2017 — edited Mar 31 2017

Hi,

Is there a way to display the output of a DML statement executed within a stored procedure or a PL/SQL block?

For example, consider the following PL/SQL block

BEGIN

    DELETE FROM TABLE_1;

END;

I want to display the output of that DML statement like "2 rows deleted". I not looking for just the number of rows, I want the whole text message to be displayed. Also my requirement is not limited to just a delete statement but includes other DML statements as well like - ALTER INDEX, TRUNCATE etc.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 28 2017
Added on Mar 31 2017
12 comments
1,459 views