RE: is there a way to return multiple cursors from a query

  • From: "Daniel Wittry" <daniel.wittry@xxxxxxxxx>
  • To: <kduret@xxxxxxxxxxxxxxxxxxxx>, "Oracle L (E-mail)" <oracle-l@xxxxxxxxxxxxx>
  • Date: Wed, 2 Feb 2005 11:16:00 -0800

Although not usually done, an Oracle function can have OUT params.

FUNCTION myFunc (in_user_id   IN     VARCHAR2,
                 io_shoesize  IN OUT NUMBER,
                 out_cursor2  OUT    myCursor)
  RETURNS myCursor
;
=20
DECLARE
  lShoesize       NUMBER :=3D 10;
  cLocalCursor    myCursor;
BEGIN
  -- WARNING: this function changes the 2nd and 3rd parameters
  ret_code :=3D myFunc(10554, lShoesize, cLocalCursor);
END;
/

For the sake of application maintenance, ensure to CLEARLY document the
side effect that the function changes parameters.

--
//www.freelists.org/webpage/oracle-l

Other related posts: