tags:

views:

613

answers:

1

I do something like

UPDATE OR REPLACE someTable SET a=1, b=2 WHERE c=3

I expect if it doesnt exist it will be inserted into the DBs. But nothing happens and i get no errors. How can i insert data, replace it if it already exist and use a where for the condition (instead of replacing BC of a unique ID)

+3  A: 

Try

INSERT OR REPLACE INTO [someTable] (a,b) VALUES(1,2) WHERE c = '3'
Sam Saffron