Join Stack Overflow to learn, share knowledge, and build your career. Connect and share knowledge within a single location that is structured and easy to search. Untested waters,I'm trying to find a way to ease things up. I'm trying to make a case when in the cursor. Since the cursor can have different inparameters and I need to sort things accordingly. I believe that Oracle should be able to optimise the above combined cursor based on the parameter passed in, but if you found it couldn't or wanted to make sure, splitting the cursor into two separate ones would help the optimzer.
Check the Contents of Ref Cursors
Using PL/SQL Stored Procedures and REF CURSORs
Subscribe to get advanced Postgres how-tos. This section discusses another type of cursor that provides far greater flexibility than the previously discussed static cursors. A cursor variable is a cursor that actually contains a pointer to a query result set. A cursor variable is not tied to a single particular query like a static cursor. Each time, a new result set is created from that query and made available via the cursor variable.
A cursor variable is a pointer that distinguishes the current row in a resultset from a multi-row query. Cursor variables have several advantages over explicit cursors including:. Cursor variables can point to a variety of queries provided the queries have a suitable return type. In contrast, explicit cursors are tied to individual queries.
Join Stack Overflow to learn, share knowledge, and build your career. Connect and share knowledge within a single location that is structured and easy to search. Below is the package definition:. I guess the question is this possible and if so, what do I need to do.