【发布时间】:2019-09-02 19:30:14
【问题描述】:
我正在研究 oracle 的 HR 计划。我有记录表
type emp_record is RECORD(emp_first_name employees.first_name%type,
emp_last_name employees.last_name%type,
);
type emp_record_table is table of emp_record
index by pls_integer;
我想将下一个 select 语句的结果插入到 emp_record_table 中
select first_name, last_name
from employees
where department_id=30;
你能解释一下如何解决这个问题吗?谢谢。
【问题讨论】:
-
必须是关联数组吗?使用嵌套表,代码会更简单。
-
它必须是记录表,因为我知道这仅适用于关联数组
标签: oracle plsql collections record