select id from a where ...
id
1
2
3
4
....
怎么写语句,循环上面查出来的结果做插入语句的值
insert B (id,...) values(?,...)
http://www.cnblogs.com/JasonChou/archive/2009/02/24/1397485.html
参考这个。
select * into B from A where id ......
select id into B from A where id ......