On 16 Jul 2011, at 21:30, Kevin Martin wrote: > insert into x values ('abc', -1); > update x set pos = 1+max(0,(select max(pos) from x));
Oops, deliberate mistake there. As I'm sure you all realise that should be update x set pos = 1+max(0,(select max(pos) from x)) where name='abc'; Kevin _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users