This is a discussion on What to put in package specifications within the Oracle Miscellaneous forums, part of the Oracle Database category; --> It's a given that public procedures and functions are declared in the package specification. But what general rule of ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| It's a given that public procedures and functions are declared in the package specification. But what general rule of thumb, if any, is used to decide whether an object such as a cursor should be put in the package specification or declared in the procedure itself in the package body? |
| |||
| "Dereck L. Dietz" <dietzdl@ameritech.net> wrote in message news:VCs9g.86466$dW3.312@newssvr21.news.prodigy.co m... > It's a given that public procedures and functions are declared in the > package specification. But what general rule of thumb, if any, is used to > decide whether an object such as a cursor should be put in the package > specification or declared in the procedure itself in the package body? > > Use normal scoping rules. Where do you want the object visible? Inside the procedure only or global to all procedures? Jim |
| ||||
| Another way of phrasing Jim's response guidence would be to ask, "where do I need to reference this from?" PL/SQL tables, record types, collections, and reference cursors that you want to pass to or from the package to other stored routines or external programs are canidates for being defined in the package specification. HTH -- Mark D Powell -- |