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

android - net_scheduler holding wakelock -

sql - MySQL : Getting Entries from a many-to-many table -

java - Retrieving data from database using jsp (Hibernate + Spring + Maven) -