Home » SQL & PL/SQL » SQL & PL/SQL » query
query [message #7453] Mon, 16 June 2003 00:37 Go to next message
sridhar
Messages: 119
Registered: December 2001
Senior Member
Hi,
i want to execute 10 DML statements one by one in a
procedure.All operations on different tables(no dependency)
If any one fails in the middle i have to rollback the previousely executed statements.
Eg, there r 10 statements, after executing 5, 6th fails then i have to roollbak all the precvious 5 statements.

plz send the reply ASAP.
Sridhar.
Re: Transaction control [message #7466 is a reply to message #7453] Mon, 16 June 2003 11:06 Go to previous message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
create or replace procedure p
is
begin
  insert ...;
  update ...;
  delete ...;
  ...
  insert ...;
  update ...;
  delete ...;
  commit;
exception
  when others then
    rollback;
    raise;
end;
Previous Topic: EXECUTE IMMEDIATE question
Next Topic: How to Find out if a string is an ip address? (using oracle or sqlplus or sqlldr???)
Goto Forum:
  


Current Time: Fri Mar 29 10:45:49 CDT 2024