Android SQLite Insert or Update

后端 未结 8 1960
太阳男子
太阳男子 2020-12-04 09:38

as can be seen in the documentation the syntax to make insert or update is : INSERT OR REPLACE INTO

() VALUES (), my
8条回答
  •  天涯浪人
    2020-12-04 10:13

    SQLiteDatabase.replace() is probably what you are looking for. I haven't tried it but the doc says it returns the row ID of the newly inserted row, so it may work.

提交回复
热议问题