python - Change a column and then insert into another table -


   insert newtable             select one.col1 first, two.col2 second         thing1 1 inner join thing2 2         on         

i'm trying insert newtable above. however, want is

   insert newtable             select one.col1 first, two.col2 + 1 second         thing1 1 inner join thing2 2         on         

meaning want change second column (plus one) before inserting newtable.

how can in sqlite?

1). create , name temporary table, increment 1 (update table), , insert result newtable? (how?) or 2). directly / concise possible?

i tried:

 insert newtable         update(         select one.col1 first, two.col2 second         thing1 1 inner join thing2 2         on                    )set second = second + 1 

and doesn't work. can similar?


Comments

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

apache - How do I stop my index.php being run twice for every user -