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!

delete statement: how to get count of affected rows in a variable

gene golubJul 23 2009 — edited Jul 23 2009
Hi folks
I write a proc which deletes data from bunch of table based on data value. i want to produce a report which will have 1 line for each table like:
Del: Table name : number of rows
I parse delete statement into variable and use execute immediate. I know I could precede delete by select count(*) using the same criteria. Is there any more effective way to catch output from execution of 'delete' itself to avoid an overhead of running select count(*)?

Thank you, Gene.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 20 2009
Added on Jul 23 2009
11 comments
10,358 views