Bulk Binding
来源:互联网 发布:吉他中国淘宝 编辑:程序博客网 时间:2024/06/05 09:13
1.FORALL:打包进入SQL引擎
2.BULK COLLECT:打包返回PL/SQL引擎
● Bulk Binding FORALL: Example
create or replace procedure raise_salary(precent number) is type numlist is table of number index by binary_integer; id numlist;begin id(1):=100;id(2):=102; id(3):=106;id(3):=110; forall i in id.first..id.last update employees set salary = ( 1 + percent/100)*salary where manager_id = id(i);end;
create or replace procedure get_departments(loc number) iscursor dept_csr is select * from departments where location_id =loc;type dept_tabtype istable of departments%rowtype;depts dept_tabtype;begin open dept_csr; fetch dept_csr bulk collect into depts; close dept_csr; for i in 1..depts.count loop dbms_output.put_line(depts(i).department_name||''||depts(i).department_name); end loop;end;
●Using BULK COLLECT INTO with a RETURNING Clause
create or replace procedure raise_salary(rate number) is type emplist is table of number; type numlist is table of employees.salary%type index by binary_integer; emp_ids emplist:=emplist(100,101,102,104); new_sals numlist;begin forall i in emp_ids.first..emp_ids.last update employees set commission_pct=rate*salary where employee_id = emp_ids(i) returning salary bulk collect into new_sals; for i in 1..new_sals.count loop dbms_output.put_line(i); end loop;end;
- Bulk Binding
- Oracle Bulk Binding
- ORACLE Bulk Binding批量绑定
- bulk
- FORALL使用--insert/delete/update操作的批绑定Bulk Binding
- Binding
- binding
- Binding
- Binding
- Bulk SQL
- BULK INSERT
- BULK INSERT
- Bulk Transfer
- bulk upload
- ElasticSerarch bulk
- BULK INSERT
- BULK Insert
- Bulk Collect
- 折腾二维数组
- POJ3180 The Cow Prom Tarjan 链接表 pascal 解题报告
- 迭代器是什么
- Oracle RAC系列:如何为Oracle 11gR2 Grid 配置Linux DNS
- ubuntu软件安装、卸载、查询工具使用介绍
- Bulk Binding
- python系列学习六——移动开发
- Windows下获取Dump文件以及进程下各线程调用栈的方法总结
- iOS 设置背景图片
- 多线程__【线程间通信】【等待唤醒机制】【多生产多消费】【Lock&Condition接口】
- java web开发学习-13 ajax技术简介
- 数据结构当中的问题
- 带姓名的多科成绩单
- Diablo2oo2s Universal Patcher(文件补丁工具) 2.18.3 绿色汉化版