SQLite 在何处插入或替换 [英] SQLite Insert or Replace Where
本文介绍了SQLite 在何处插入或替换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个包含 3 列、ID、描述和键的表,其中 ID 不是主键!我想要的是插入或更新/替换当前记录.示例:解密密钥ID 描述 键999 生日 24.12.1988
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
我试过了,但是不行:
INSERT OR REPLACE INTO decryptionKeys VALUES ("999","Birthday","25.12.1988") WHERE ID="999" AND Description="Birthday"
推荐答案
leave thr where 子句
leave thr where clause
INSERT OR REPLACE INTO decryptionKeys VALUES ("999","Birthday","25.12.1988")
这篇关于SQLite 在何处插入或替换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文