㈠ pl/sql存儲過程返回record類型的結果,java里如何調用呢
用object,不用record.
object SQL支持,record屬於PL/SQL。
給你一個TOM的例子:
1. create or replace type myScalarType
as object (x int,y varchar2(20),z date,
member function get_Y(x int) return varchar2);
2 .create or replace type myTableType as table of myScalarType;
3. create or replace function non_pipelined( p_like in varchar2 )
return myTableType
as
l_data myTableType;
begin
select myScalarType(user_id, username, created)
BULK COLLECT into l_data
from all_users
where username like p_like;
return l_data;
end;
4.select * from TABLE( non_pipelined( '%A%' ) );