How to return a empty cursor from a stored procedure? How to return a empty cursor from a stored procedure? oracle oracle

How to return a empty cursor from a stored procedure?


you can try this

IF condition = true THEN   OPEN OUT_CUR FOR    Select Some query;ELSE   OPEN OUT_CUR FOR        Select * from mtable where 1=2;END IFreturn OUT_CUR;


IF condition = true THEN   OPEN OUT_CUR FOR    Select Some queryELSE    OPEN OUT_CUR FOR select * from unnest(array[1,2]) arr where  false END IF