如果表b为空
insert into b 
select rownum id,t.* from 
(select * from b,d from a
 order by b,d) t;如果b原先有数据,序号id目前为n
insert into b 
select rownum+n id,t.* from 
(select * from b,d from a
 order by b,d) t;