insert all
into SAL_HISTORY values (ename,hiredate,sal)
into MGR_HISTORY values (ename,mgr,sal)
select ename,hiredate,mgr,sal from emp;
insert all
when sal>1000 then
into SAL_HISTORY values (ename, hiredate,sal)
when mgr>7700 then
into MGR_HISTORY values (ename,mgr,sal)
select ename,hiredate,mgr,sal from emp;
insert first
when sal>3000 then
into SAL_HISTORY values (ename,hiredate,sal)
when sal>1000 then
into MGR_HISTORY values (ename,mgr,sal)
select ename,hiredate,mgr,sal from emp;
如果某行数据满足第一个when子句的条件,那么随后when子句会跳过该行数据。
create table mgr_history
as select ename,mgr,sal from emp where 1=2;
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/30090120/viewspace-1422704/ ,如需转载,请注明出处,否则将追究法律责任。