SQLite Insert or Replace Where

喜欢而已 提交于 2020-01-12 19:26:35

问题


i have a table with 3 columns, ID, Description and Key where ID is not a primary key! What i want is to insert or update/replace a current record. Example: decryptionKeys ID Description Key 999 Birthday 24.12.1988

I tried this but it won't work:

INSERT OR REPLACE INTO decryptionKeys VALUES ("999","Birthday","25.12.1988") WHERE ID="999" AND Description="Birthday"

回答1:


leave thr where clause

INSERT OR REPLACE INTO decryptionKeys VALUES ("999","Birthday","25.12.1988")


来源:https://stackoverflow.com/questions/10573215/sqlite-insert-or-replace-where

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!