我需要将存储过程返回的值插入到表中。我的存储过程由多个选择语句和联合组成,如下所示:
create or replace
PROCEDURE "my_str_proc" (
emp_code IN VARCHAR2,
hired_year IN VARCHAR2,
q_bio OUT SYS_REFCURSOR)
AS
BEGIN
OPEN q_bio FOR
select column list from table_1 where....and...
UNION
select column list from table_2 where....and...
UNION
select column list from table_3 where....and...
UNION
select column list from table_4 where....and...
ORDER BY hired_year;
RETURN;
/* I plan to add the following statement to the existing proedure script:*/
/* How can I get the return values after the procedure is done running
and inserted into a table ? */
INSERT INTO Report_table (col1,col2,col3,col4,col5,col6,col7,col8,col9)
VALUES (?????)
END;
如何编写脚本,以便将最后过程返回的值插入到我创建的表中。我找不到脚本示例,而且我是 Oracle 新手。我们的 Oracle 是 11g