Re: Can a procedure contain only a SELECT statement?
From: Thomas Gagne <TandGandGAGNE_at_gmail.com>
Date: Thu, 18 Mar 2010 22:33:45 -0400
Message-ID: <I9ydneZ_uocPfz_WnZ2dnUVZ_vydnZ2d_at_wow.com>
John Hurley wrote:
> On Mar 17, 9:53 pm, Thomas Gagne <TandGandGA..._at_gmail.com> wrote:
>
> snip
>
> # I'm looking around for Oracle 10g CREATE PROCEDURE syntax and
> looking
>
>> for examples with simple SELECT statements inside.
>>
>
> Why exactly would you want to do that in the first place?
>
> Have you looked at something like this? http://www.oradev.com/ref_cursor.jsp
>
I've used it before in other RDBs. The example was deliberately simplified. My intent would be to allow more complicated processing before the final SELECT. In some cases the procedure could do some simple parameter checking, call other procedures, and preprocess into temporary tables before the final projection. Though I haven't had the need inside MySQL, I understand MySQL has provided this since 5.1. Received on Thu Mar 18 2010 - 21:33:45 CDT
Date: Thu, 18 Mar 2010 22:33:45 -0400
Message-ID: <I9ydneZ_uocPfz_WnZ2dnUVZ_vydnZ2d_at_wow.com>
John Hurley wrote:
> On Mar 17, 9:53 pm, Thomas Gagne <TandGandGA..._at_gmail.com> wrote:
>
> snip
>
> # I'm looking around for Oracle 10g CREATE PROCEDURE syntax and
> looking
>
>> for examples with simple SELECT statements inside.
>>
>
> Why exactly would you want to do that in the first place?
>
> Have you looked at something like this? http://www.oradev.com/ref_cursor.jsp
>
I've used it before in other RDBs. The example was deliberately simplified. My intent would be to allow more complicated processing before the final SELECT. In some cases the procedure could do some simple parameter checking, call other procedures, and preprocess into temporary tables before the final projection. Though I haven't had the need inside MySQL, I understand MySQL has provided this since 5.1. Received on Thu Mar 18 2010 - 21:33:45 CDT