oracle大批数据加载

1.使用字表查询插入数据

 

insert into employee (name,num,sal)

select name,num,sql from emp where num between 0 end 20;

 

 

当需要加载大量数据的时候,使用

insert /*+APPEND */ into employee (name,num,sal)

select name,num,sql from emp where num between 0 and 20;

 

 

2.使用all操作符进行多表插入

当满足条件就将记录插入到表中

insert all

when num = 0 then into dept1

when num = 2 then into dept2

when num = 3 then into dept3

else into otherdept

select * from emp;

 

3.使用first操作符进行多表插入

当满足第一个条件,就直插入第一个表中

insert first

when num = 0 then into dept1

when num = 2 then into dept2

when num = 3 then into dept3

when sal >8000 then into dept4

else into other

select * from emp;

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值