申明oracle函数,及其结果集结构
- 结果集必须为全局的、table of 不能用index by
CREATE OR REPLACE TYPE EMPARRAY is object (corporationId number);
CREATE OR REPLACE TYPE EMPARRAY2 is table of EMPARRAY;
获取返回游标。
- oracle集合类应用
--全局声明
create or replace type LIST is table of number(8);
inList list
--批量保存
select id bulk collect
into inList
from user
--批量匹配
from ...
where id in (select * from table(inList));