Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: EXEC syntax for SP which returns row set
Mark A wrote:
>
> Keep in mind that I am talking about a command line interface, not an
> application program. The result set just prints out on the output, sort of
> like it does when you say "print results" as the final step in SQL*Plus.
>
I found some DB2 manuals. From a very qick glance, it looks like if you add a DYNAMIC RESULTS SET n clause to the CREATE PROCEDURE, and specify an upper bound n for the number of rows you will get back, and then declare a cursor within the the SP with the syntax WITH RETURN, then exit the SP with that cursor open, then that's what you get back as the result set, right ?
If so, same basic idea as a refcursor, slightly different sugar is all, and possibly a little blurring of the lines between what we would see as a function as opposed to the SP. Would be interesting to see what is the standard.
FYI - probably the best source for answers to newbie questions on Oracle is probably asktom.oracle.com Received on Fri Jul 15 2005 - 00:32:14 CDT