Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- create or replace type my_table_info_function as object(
- ORDER_ID VARCHAR2(40),
- OPER_KEY NUMBER,
- STEP_KEY NUMBER)
- CREATE OR REPLACE TYPE MY_TYPE as table of my_table_info
- create or replace function MY_FUNCTION(vi_col1 table.col1%type,
- vi_col2 table.col2%type,
- vi_col3 table.col3%type)
- return MY_TYPE as
- V_RESULTS MY_TYPE :=MY_TYPE();
- V_RESULTS.EXTEND;
- V_RESULTS(V_RESULTS.LAST):=MY_TYPE(vi_col1,vi_col2,vi_col3);
- return V_RESULTS;
- Now in your query, you can directly select column from type as below;
- select col1,col2,col3 from my_table_info_function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement