android - Sqlite Autoincrement -
i'm trying update id column in table of memos. if memo id of 3 gets deleted, row underneath becomes id of 3.
sqlitedatabase.execsql("create table " + table_name + "(" + "id integer primary key autoincrement, memo text, urgency text)"); to create table, works fine i'm getting sqlite error "near autoincrement".
db.execsql("alter table " + table_name + " autoincrement = (select max(id) " + table_name + ");");
autoincrement not work guess expecting.
if column has type integer primary key autoincrement different rowid selection algorithm used. rowid chosen new row @ least one larger largest rowid has ever before existed in same table.
Comments
Post a Comment