0

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

mDb.delete("SQLITE_SEQUENCE", null, null);
ofeking109
  • 71
  • 1
  • 11
  • 2
    It could matter because sometimes we trying to solve a problem not in a right way in the same time not seeing much straightforward and simple solution – sll Dec 22 '11 at 16:35

1 Answers1

0

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.

Community
  • 1
  • 1
Yaqub Ahmad
  • 27,569
  • 23
  • 102
  • 149