Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: How do you delete a savepoint?
If you set a new savepoint with a name formerly used, the elder
savepoint vanishes:
SQL> create table t (a number);
Table created.
SQL> insert into t values (1);
1 row created.
SQL> select * from t;
A
1
SQL> savepoint s1;
Savepoint created.
SQL> insert into t values (2);
1 row created.
SQL> select * from t;
A
1
2
SQL> rollback to savepoint s1;
Rollback complete.
SQL> select * from t;
A
1
SQL> insert into t values (2);
1 row created.
SQL> savepoint s1;
Savepoint created.
SQL> insert into t values (3);
1 row created.
SQL> select * from t;
A
1
2
3
SQL> rollback to savepoint s1;
Rollback complete.
SQL> select * from t;
A
1
2
SQL> rollback to savepoint s1;
Rollback complete.
SQL> select * from t;
A
1
2
SQL> drop table t;
Table dropped.
On 6 Mar 2002 10:53:00 -0800, asanramon_at_yahoo.com (AngeloSR) wrote:
>Thanks for the reply guys. Here is what I am trying to do, at some
>point in the transaction I created a savepoint to fall back to when
>things go wrong. However, if things go well, I want to remove the
>savepoint I created without commiting or rolling back. I want to
>create another savepoint, with the same name as before, somewhere in
>the transaction if thing go well.
>
>I am writing a code that would use three different database (DB2, SQL
>Server, and Oracle). In some of these databases, if I don't delete a
>savepoint before creating a new one with the same name, I will get a
>nested savepoints. I want to avoid that situation.
>
>Thanks again,
>
>Angelo
>
>
>asanramon_at_yahoo.com (AngeloSR) wrote in message news:<f3216b11.0203051639.720009f5_at_posting.google.com>...
>> I have been looking for a way to delete a savepoint, but to no avail.
>> Does anybody know how to do it?
regards
Marc Blum
mailto:marc_at_marcblum.de
http://www.marcblum.de
Received on Fri Mar 08 2002 - 14:22:50 CST
![]() |
![]() |