Hi, Clemens,
On Fri, Oct 25, 2013 at 2:12 AM, Clemens Ladisch <clem...@ladisch.de> wrote: > Igor Korot wrote: > > what I'm looking for is a way to populate the current_rank and > > original_rank in the leagueplayers table. They should come up as > > auto-incremented values. > > Autoincrementing works only for INTEGER PRIMARY KEY columns. > Well it will not be defined as auto-increment. Just the values in the column will be 1,2,3,4 etc. i.e. incremented by 1 starting from 1 for every single league. > > Is there a way to do that or I will have to change the query to do a > > transactional routine? > > You could create a temporary table with such a column. > OK. And then how do I use it? Basically I'm looking for a way to implement it with the minimal changes to the code/query.... As I wrote I have INSERT INTO ... SELECT. Are you saying that I can create a temp table with autoincrement value and all other data from the SELECT part and then use it for INSERT query? Thank you. > > Doing this in your code might be simpler. > > > Regards, > Clemens > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users