CREATE OR REPLACE PACKAGE kscope_ptf AS
FUNCTION describe (p_tbl IN OUT DBMS_TF.TABLE_T )
RETURN DBMS_TF.DESCRIBE_T;
END;
CREATE OR REPLACE PACKAGE BODY kscope_ptf AS
FUNCTION describe (p_tbl IN OUT DBMS_TF.TABLE_T )
RETURN DBMS_TF.DESCRIBE_T IS
BEGIN
RETURN NULL;
END;
END;
CREATE OR REPLACE FUNCTION kscope_func(p_tbl IN TABLE )
RETURN TABLE PIPELINED
TABLE POLYMORPHIC USING kscope_ptf;
SELECT *
FROM kscope_func(kscope)
SELECT *
FROM kscope_func(kscope PARTITION BY year
ORDER BY year)