I have a table product(id_product , name );
I have another one: productHistory (id_H , id_product , name);
I wanna create a query (db2) to insert all the row
Make id_h auto increment and try this
insert into productHistory ( id_product , name) values (select id_product , name from product );
id_h will auto-increment no need to put it in query
Hope it will help