> --- Begin --- > > sqlite> drop table if exists demo; > sqlite> create table demo (id integer primary key autoincrement, value > text); > sqlite> begin transaction; > sqlite> insert into demo (value) VALUES ('value'); > sqlite> select last_insert_rowid(); > 1 > sqlite> delete from demo where id = 1; > sqlite> rollback; > sqlite> begin transaction; > sqlite> insert into demo (value) VALUES ('value'); > sqlite> select last_insert_rowid(); > 1 > > --- End --- > > Using a delete statement before the rollback > doesn't help. > > I really want sqlite to only issue an id once. >
Surely the whole point of rollback is that it puts the database back to the state it was in before the transaction started. So everything should be just as if no inserts (or deletes or anything else)had happened, including any changes to autoincrement values. Regards Andy Ling _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users