Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: SAVEPOINT... ROLLBACK question

Re: SAVEPOINT... ROLLBACK question

From: Ubiquitous <weberm_at_polaris.net>
Date: Thu, 4 Dec 2003 15:56:19 +0000 (UTC)
Message-ID: <bqnlf3$kp4$1@news.utelfla.com>


Daniel Morgan <damorgan_at_x.washington.edu> wrote:

: You don't provide enough information but ...

:

: create table test (
: testcol varchar2(10));
: SQL> savepoint a;
: Savepoint created.
: SQL> insert into test values ('A');
: 1 row created.
: SQL> savepoint b;
: Savepoint created.
: SQL> insert into test values ('B');
: 1 row created.
: SQL> rollback to a;
: Rollback complete.
: SQL> select count(*) from test;
: COUNT(*)
: ----------
: 0
: What do yo think it should be doing?

That's what I am expecting to happen, but when I call the rollback statement, it doesn't roll all the way back to SAVEPOINT A. I suspect there's a commit in the stored procedure step, but wouldn't using ROLLBACK TO A override it?  

What would happen if it didn't include the CREATE TABLE statement and started with SAVEPONT A instead? I'll have to experiment some more.   Received on Thu Dec 04 2003 - 09:56:19 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US