Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQLite Insert or Replace Where

Tags:

sql

sqlite

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"
like image 339
Manu Avatar asked May 13 '12 16:05

Manu


1 Answers

leave thr where clause

INSERT OR REPLACE INTO decryptionKeys VALUES ("999","Birthday","25.12.1988")
like image 184
juergen d Avatar answered Sep 18 '22 23:09

juergen d