Declare a table type with multiple columns
744464Sep 6 2011 — edited Sep 6 2011I have a table type with one column and I want to create one with two columns.
My type is:
create or replace type "NUMBER_TABLE" as table of number;
And I uses it in function:
FUNCTION GetValues()
return NUMBER_TABLE
as
results NUMBER_TABLE := NUMBER_TABLE();
begin
select OrderId bulk collect into :results from(select * from tbl_orders);
--Some other code...
end;
I want the select be like that:
select OrderId, OrderAddress bulk collect into :results from(select * from tbl_orders);
How to do that?