This might be helpful. Maybe not. It's not an answer to the exact question, but ...
What if you were to set all the IDs to their negative, then update them as desired? UPDATE TABLEA SET ID = -ID; UPDATE TABLEA SET ID = -ID + 1; Or something like that. It is not as efficient as would be preferred, but it should avoid the problem. Assumes you aren't using negative primary keys or foreign keys... On Jan 23, 2017 8:54 AM, "Clemens Ladisch" <clem...@ladisch.de> wrote: Cecil Westerhof wrote: >> UPDATE desktops >> SET indexNo = indexNo + 1 >> >> But it does not, it gives: >> Error: UNIQUE constraint failed: desktops.indexNo > > It is actually quite simple: > PRAGMA ignore_check_constraints = ON A UNIQUE constraint is not a CHECK constraint. Regards, Clemens _______________________________________________ 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