Home » SQL & PL/SQL » SQL & PL/SQL » Question on savepint
Question on savepint [message #572417] Tue, 11 December 2012 16:57 Go to next message
bobbyjohnz
Messages: 1
Registered: December 2012
Location: Australia
Junior Member
Scenario

begin
savepoint a;
statement 1;
savepoint b;
statement 2;
end;

After completing statement 2, is there a way I can commit statement 2 alone but want to rollback statement 1?
Per what I know, if I do a commit after statement 2 both statements 1 and 2 will get committed while if I do a rollback to savepoint a both the statements will get rolled back.
To put the question in another way, can I use something like 'commit to savepoint b' similar to the statement 'rollback to savepont b' ?
Re: Question on savepint [message #572418 is a reply to message #572417] Tue, 11 December 2012 17:07 Go to previous messageGo to next message
BlackSwan
Messages: 23058
Registered: January 2009
Senior Member
Please read and follow the forum guidelines, to enable us to help you:

http://www.orafaq.com/forum/t/88153/0/


>To put the question in another way, can I use something like 'commit to savepoint b' similar to the statement 'rollback to savepont b' ?
no
Re: Question on savepint [message #572432 is a reply to message #572417] Wed, 12 December 2012 01:43 Go to previous message
Michel Cadot
Messages: 59793
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
May we know why you want to do this.
What is the actual issue you are trying to solve?

Regards
Michel
Previous Topic: Update table with primary key in where clause
Next Topic: Export BLOB file in Excel
Goto Forum:
  


Current Time: Wed Nov 26 14:57:44 CST 2014

Total time taken to generate the page: 0.12993 seconds