insert all
when deptno=10 then into dept10
when deptno=20 then into dept20
else into other
select * from emp;
//当数据已经满足先前条件,并且已经被插入到其表,那么该行数据在后续的插入中将不会被利用
insert first
when deptno=10 then into dept10
when deptno=20 then into dept20
when job='CLERK' then into clerk
else into other
select * from emp;
本文介绍了两种SQL插入语句:insertall与insertfirst。insertall根据deptno将数据分别插入到dept10、dept20或其他表;insertfirst则根据deptno及job条件将数据插入到指定表,已匹配的数据在后续插入中不再使用。

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



