1、问:如何清空表中所有数据 并重置自增长数据?
答:
delete from 表名;
select * from sqlite_sequence;
找到上面的 表名
update sqlite_sequence set seq=0 where name='表名';
2、问:如何获取类似mysql里的 mysql_insert_id?
答:
select last_insert_rowid() as id from '表名'
1、问:如何清空表中所有数据 并重置自增长数据?
答:
delete from 表名;
select * from sqlite_sequence;
找到上面的 表名
update sqlite_sequence set seq=0 where name='表名';
2、问:如何获取类似mysql里的 mysql_insert_id?
答:
select last_insert_rowid() as id from '表名'