Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: EXEC syntax for SP which returns row set

Re: EXEC syntax for SP which returns row set

From: Mark Townsend <markbtownsend_at_comcast.net>
Date: Thu, 14 Jul 2005 22:32:14 -0700
Message-ID: <iKSdnT0G0qyV10rfRVn-vw@comcast.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US