Copying and pasting columns from a table to another table

I have two tables, 'source' and 'target' table.

  • 'source' table is filled with data, while 'target' table is completely empty with only column names
  • All columns in the 'target' table are nullable

I want to select some columns in the 'source' table and paste them to 'target' table, but I can't find any easy way to do this as the 'target' table requires not-nullable primary key 'id'. I want it to increment the 'target' id as I go, while copying and pasting the columns using sql (I am using sql because I need to refer to which columns to copy and paste dynamically). Is there a good way to do this?

made it work: just use
insert into table1 (column1, column2, .. etc.)
select column6, column7.. from table2