【问题标题】:Why can't I reset the row number count in the android DataBase?为什么我不能重置 android 数据库中的行号计数?
【发布时间】:2012-01-26 05:40:31
【问题描述】:

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

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

【问题讨论】:

  • 这可能很重要,因为有时我们试图以不正确的方式解决问题,同时却没有看到很多直接和简单的解决方案

标签: java android database sqlite methods


【解决方案1】:

试试这个:

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

详情请见this

【讨论】:

    猜你喜欢
    • 2012-06-05
    • 1970-01-01
    • 2010-10-02
    • 1970-01-01
    • 2012-10-30
    • 1970-01-01
    • 1970-01-01
    • 2017-04-13
    • 2012-12-19
    相关资源
    最近更新 更多