在oracle中如何用一条sql语句把一个表中多条记录写到另外一个表中:
insert into Table2(vehicleno,username) select vehicleno ,'coco' from table1 where vehicleno like '%XX%' and vehicleProNo='XX'
博客介绍了在Oracle里,使用一条SQL语句将一个表中的多条记录写入另一个表的方法。给出示例语句,通过insert into和select结合,筛选符合条件的记录插入目标表。
在oracle中如何用一条sql语句把一个表中多条记录写到另外一个表中:
insert into Table2(vehicleno,username) select vehicleno ,'coco' from table1 where vehicleno like '%XX%' and vehicleProNo='XX'
6876

被折叠的 条评论
为什么被折叠?
