I'm not the OP, but I would have expected a fail to replace.

sqlite> create table t(i integer primary key, a text);
sqlite> insert into t values (null,'generates row 1');
sqlite> replace into t values (null,'generates row 2'),(1,'replaces row 1');
sqlite> select * from t;
1|generates row 1
1|replaces row 1

If primary keys are to be unique, this isn't valid.  But I've not looked at
the documentation for specs.

On Mon, May 1, 2017 at 12:41 PM, Richard Hipp <d...@sqlite.org> wrote:

> On 5/1/17, E.Pasma <pasm...@concepts.nl> wrote:
> > Hello, I have a duplicate rowid in a 3.16.2 database and this is
> > essentially produced as follows:
> >
> > CREATE TABLE t(i INTEGER PRIMARY KEY, a TEXT);;
> > INSERT INTO t VALUES
> >      (NULL, 'generates row 1');
> > REPLACE INTO t VALUES
> >      (NULL, 'generates row 2'),
> >      (1, 'replaces row 1');
>
> What were you expecting this to do?
>
> --
> 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
>
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to