Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Puzzled: CURSOR in Package
Thanks, Conner , for your input.
I understand but I still can't help thinking:
The exact SAME benefits you indicated....
can it not be achieved by simply put the WHOLE cursor
declaration AND definition in the pkg spec as opposed just
the cursor header in the pkg spec ?
I mean I can just modify the SQL in the spec and recompile
and nothing else is affected, right ?
So this goes back to my original question. ie Putting the cursor
in spec, that's good and well. But what I am wondering is why
the SELECT in the body.
jane
"Connor McDonald" <connor_mcdonald_at_yahoo.com> wrote in message news:
> Its not about "hiding", its about modularity. You're publicising an
> object (a cursor in this case), and (hopefully) you're publishing this
> as an unchanging, guaranteed to be there definition. You're advertising
> the fact that to (say) "get a list of employees", this is the cursor to
> be used.
>
> You're protecting anyone that uses that cursor from the definition - it
> may be a query from EMP, it might be a join, it might (in 9i) be a
> PL/SQL routine that sends it results back via a pipelined clause...All
> of which you can add/change/implement/etc without a single line of code
> *outside* the package being needed.
Received on Tue Nov 20 2001 - 11:16:00 CST
![]() |
![]() |