Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle Scripting Question
"John Russell" <netnews8_at_johnrussell.mailshell.com> wrote in message
news:4o6mrvkaiishoftq91q76fm71b7uualld7_at_4ax.com...
| On 18 Nov 2003 08:49:49 -0800, dave_at_simcik.com (DTS) wrote:
| >> > -Is creating a subprogram in a package the same as creating a
| >> > standalone subprogram? In other words, will the subprograms I code in
| >> > the package show up as independent objects in the schema?
|
| The package is considered a single schema object. In the same way you
| can DESCRIBE a single procedure in SQL*Plus, you can DESCRIBE a
| package and see all the procedures and functions in it.
|
| One nice thing about packages is that once the package spec is
| compiled, you can compile other things that call the package
| procedures and functions, even though they aren't "filled in" yet. So
| procedures and functions inside a package can call back and forth to
| each other freely, and you don't have to worry about compiling them in
| any particular order, as you do with standalone procedures and
| functions.
|
| John
| --
an additional significant advantage of packages is the ability to create public and private package data structures (variables, constants, cursors, etc) that persist and are sharable among code within the package, and perhaps outside of the package (within the same session)