Linked Questions

Popular Questions

How to upsert in (key,value) sqlite database table?

Asked by At

I have a (key,value) database table in sqlite. I want to update an existing key with the value in case it already exists. And if the key doesn't exist, insert the key and value into the table.

What would be best sql statement to do that?

I am creating the table using the statement:

CREATE TABLE KeyValueTable ( EntityName TEXT PRIMARY KEY NOT NULL, EntityValue BLOB)

Related Questions