Basically, I want to extract id from a table and paste this id into another table with some other data. So the algorithm goes:
foreach id in (select id from table) { insert into table2 values (id,etc,etc); }
How to execute this function with SQL query?
source share