Returning a RefCursor with Oracle

Created 21 July 2005 00:00
  FUNCTION my_function() RETURN SYS_REFCURSOR IS
    ref_cursor SYS_REFCURSOR;
  BEGIN
    OPEN ref_cursor FOR
      SELECT * FROM my_table;
      RETURN (ref_cursor);
  END;