On 1/7/20, Michael Kappert <michael.kapp...@gmx.net> wrote:
>
> If I understand correctly, the upsert should behave like UPDATE in the
> examples above, but it behaves like a DELETE followed by INSERT instead?
>

REPLACE and UPSERT are different things.  See
https://www.sqlite.org/lang_conflict.html for information about
REPLACE and https://www.sqlite.org/lang_UPSERT.html for information
about UPSERT.

REPLACE works by first DELETE-ing any rows that would cause a conflict
and then doing the INSERT.

UPDATE works by converting the INSERT into an UPDATE.
-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to