How to call the returned function Oracle Record Table

I need to get data from a function that returns a record table. for instance

Pkg1 package

The specified record inside the package:

type rec is record(id number,name varchar2(40));

Record table defined inside the package:

type rec_tbl is table of rec;

Function defined inside the package:

FUNCTION get_rec_tbl() RETURN rec_tbl;

Now I need to do the following: using spring jdbc or spring jdbctemplate to get the values ​​from the function and process it. I am not sure how to do this.

Can anyone help?

+5
source share
2 answers

Record type> is not directly supported by Oracle JDBC drivers.

There is an ugly workaround , as stated in the official JDBC link. Never used it myselft, thought.

+2

:

select * from table(get_rec_tbl())
+2

All Articles