--使用merge语句 create table new as select * from emp where 1=0; insert into new (empno,ename) select empno,ename from emp where deptno=10; merge into new n using emp e on (n.empno=e.empno) when matched then update set n.sal=e.sal when not matched then insert (n.empno,n.ename,n.sal,n.comm) values (e.empno,e.ename,e.sal,e.comm); select * from new;