On 9 May 2012, at 10:33am, <ext-esko.huja...@elektrobit.com> wrote: > 1: SAVEPOINT 1 > 2: insert A > 3: RELEASE SAVEPOINT 1
> 4: SAVEPOINT 2 > 5: insert B > 6: ROLLBACK TO SAVEPOINT 2 > > ROLLBACK in line 6 cancels also line 2 in addition to line 5. > > I want to cancel just line 5. What it does depends on whether there's a 'BEGIN' before your step one, but see <http://www.sqlite.org/lang_savepoint.html> "The RELEASE of an inner transaction does not cause any changes to be written to the database file; it merely removes savepoints from the transaction stack such that it is no longer possible to ROLLBACK TO those savepoints." I think you want transactions, not rollbacks: 1: BEGIN TRANSACTION 2: insert A 3: COMMIT TRANSACTION 4: BEGIN TRANSACTION 5: insert B 6: ROLLBACK TRANSACTION Simon.w _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users