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!

Update/Insert/Delete into the same table

user518071Jun 18 2012 — edited Jun 18 2012
Hi,
I'm writing pl/sql code :
nvoice_id will be passed as parameter and based on invoice_id I need to see whether any records exist in history table.If not any then insert record into table.If more than one record exist then I need delete all except most recent one based hist_seq column in that table.
Then I need to update that record for description column .How to put dml operation one after another in an efficient manner?As one statement depend on another do I need to use autonomous transaction?


Thanks,
Kiran
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 16 2012
Added on Jun 18 2012
1 comment
298 views