Hi All,
Please help me achieve this.
I want to return table as an out parameter in Oracle SQL.
Here's how my code looks like:
create or replace type records_array_type as object (
EMPNAME VARCHAR(20),
EID VARCHAR2(20),
SAL VARCHAR(20)
);
create or replace type records_array as table of records_array_type
CREATE OR REPLACE PROCEDURE getEmpData(ename in VARCHAR, record out records_array)AS
table_rec records_array;
BEGIN
SELECT records_array_type(NAME, EMPID,SALARY)
BULK COLLECT INTO table_rec
FROM EMPLOYEE where name = ename ;
END getEmpData;
Is this correct? How do I execute this?