On 20 Nov 2017, at 2:57pm, Clemens Ladisch <clem...@ladisch.de> wrote:

> Simon Slavin wrote:
>> UPDATE fruit SET id = id+1 WHERE id >=2;
> 
> This is unlikely to work because some ID values can conflict in the
> middle of the execution.

Which in fact violates formal requirements.  Im SQL it is proper to have 
constraint checks only at the end of an instruction, or only at the end of a 
transaction.

However you are right with respect to SQLite.  Which only increases the 
importantce of the second part of my post: why does OP want to do this ?  
Renumbering SQL id’s is rare.

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

Reply via email to