Multiple result set not working

Started by Muthukumar.GKover 5 years ago1 messagesgeneral
Jump to latest
#1Muthukumar.GK
muthankumar@gmail.com

Hi team,

is it possible to return Multiple results set from procedure/function on
single execution. Please advise me on this. I have written sample code
below and when i execute it i dont get any result set

CREATE OR REPLACE FUNCTION multiResultset(

ref1 refcursor,

ref2 refcursor)

RETURNS SETOF refcursor

AS $$

BEGIN

open ref1 for

select * from los_approverreassignwhere pk_id= 10;

open ref2 for

select * from los_approverreassignwhere pk_id= 11;

END;

$$

LANGUAGE 'plpgsql';

[image: image.png]

Regards

Muthu