开发者

Android SQLite - How To Update The Record ID Number After Deleting Records

开发者 https://www.devze.com 2023-01-24 09:26 出处:网络
I can look up records by values and/or ID I can add records I can delete All records I can delete a specific record (by either value or ID)

I can look up records by values and/or ID

I can add records

I can delete All records

I can delete a specific record (by either value or ID)

But, the record ID only increments - it never adjusts to reflect the number of remaining records after deleting a record.

I haven't found anyth开发者_C百科ing on this subject (not even in the Doc's)

What/How do I do this?

Thanks

The declaration for this part of the db follows...

    String sql = 
        "create table " 
        + TABLE 
        + "( " + BaseColumns._ID
        + " integer primary key autoincrement, "
        + THE_NUMBER + " integer, "
        + FAV_NAME + " text not null);";


Rather than deleting this post, I'll post the ref to the answer (it's at SQL's site). link text

0

精彩评论

暂无评论...
验证码 换一张
取 消