如果删除表末尾的行,自动增量将重置:
sqlite> CREATE TABLE my_table (
id INTEGER PRIMARY KEY
);
...
sqlite> SELECT * FROM my_table;
1
2
3
sqlite> DELETE FROM my_table WHERE id = 3;
sqlite> SELECT * FROM my_table;
1
2
sqlite> INSERT INTO my_table DEFAULT VALUES;
sqlite> SELECT * FROM my_table;
1
2
3
我想要返回最后一个命令
1
2
4
这可能吗?