Manu
Manu

Reputation: 149

SQLite Insert or Replace Where

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"

Upvotes: 9

Views: 11700

Answers (1)

juergen d
juergen d

Reputation: 204746

leave thr where clause

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

Upvotes: 9

Related Questions