On Sat, 21 Jan 2017 11:54:57 +0100
Cecil Westerhof <cldwester...@gmail.com> wrote:

> I would think that this would work:
> UPDATE desktops
> SET indexNo = indexNo  + 1
> 
> But it does not, it gives:
> Error: UNIQUE constraint failed: desktops.indexNo

It should work.  It does work in other DBMSs, but it doesn't in
SQLite.  It is a failure of atomicity in SQLite semantics.  

As DRH mentions, one workaround is to drop the constraint
temporarily.  

--jkl
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to