简体   繁体   中英

Why can't I reset the row number count in the android DataBase?

为什么我不能在android数据库中重置行号计数?

mDb.delete("SQLITE_SEQUENCE", null, null);

Try this:

// db = SQLiteDatabase
db.rawQuery("delete from your_table", null);
db.rawQuery("delete from sqlite_sequence where name='your_table'", null);

For detail, please see this .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM