I have 2 tables. I want to insert data from table2 to table1, by incrementing a value (id) for each insert from table2 into table1 (row by row).
table1
id | name |
---|---|
348 | Mike |
349 | John |
table2
name |
---|
Conny |
Fred |
Bond |
Fred |
For each insert it should be ensured that the next higher (max value) of table1 is queried and the insert is inserted. And only unique values from table2 should inserted, no duplicates.
Thank you