你可以使用一个序列发生器(sequence:如叫table_name_sequ_id)SQL语句如下:insert into a(a1,a2) select b.b1,table_name_sequ_id.nextval from b where ...;