Oracle Magazine, July/August 2018
Database Developer PL SQL ORACLE MAGAZINE JULY AUGUST 2018 118 c d e f WHAT COLLECTION TYPES CAN BE USED You can use nested table and varray types defined at the schema level with a CREATE OR REPLACE TYPE statement as shown earlier for two_ strings_ nt You can also use nested table and varray types defined in the specification of a package but only for pipelined table functions a special kind of table function Here is a very simple example of a pipelined table function based on a package specified collection type CREATE OR REPLACE PACKAGE my_ pkg AUTHID DEFINER AS TYPE names_ t IS TABLE OF VARCHAR2 100 FUNCTION my_ names RETURN names_ t PIPELINED END CREATE OR REPLACE PACKAGE BODY my_ pkg AS FUNCTION my_ names RETURN names_ t PIPELINED IS BEGIN PIPE ROW Loey PIPE ROW Juna PIPE ROW Grandpa Steven
You must have JavaScript enabled to view digital editions.