Tilsley, Jerry M. wrote:
> CREATE TABLE messages (id numeric);
>
> insert or replace into messages values (1);
>
> Why does this result in multiple rows of the same value?

INSERT OR REPLACE deletes any old row that would cause a UNIQUE
constraint violation.

Without a UNIQUE (or PRIMARY KEY) constraint, there cannot be such
a constraint violation.


Regards,
Clemens

Reply via email to