Edit D:\app\Administrator\product\11.2.0\dbhome_1\oc4j\j2ee\oc4j_applications\applications\em\em\online_help\tdddg\tdddg_subprograms002.htm
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <script src="./callback.js" type="text/javascript"></script> <noscript>Your browser does not support JavaScript. This help page requires JavaScript to render correctly.</noscript> </head> <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <meta name="generator" content="Oracle DARB XHTML Converter (Mode = ohj/ohw) - Version 5.1.1 Build 005" /> <meta name="date" content="2009-04-21T9:46:24Z" /> <meta name="robots" content="noarchive" /> <meta name="doctitle" content="About Packages" /> <meta name="relnum" content="11g Release 2 (11.2)" /> <meta name="partnum" content="E10766-01" /> <link rel="copyright" href="./dcommon/html/cpyr.htm" title="Copyright" type="text/html" /> <link rel="stylesheet" href="./dcommon/css/blafdoc.css" title="Oracle BLAFDoc" type="text/css" /> <link rel="contents" href="toc.htm" title="Contents" type="text/html" /> <link rel="prev" href="tdddg_subprograms001.htm" title="Previous" type="text/html" /> <link rel="next" href="tdddg_subprograms003.htm" title="Next" type="text/html" /> <title>About Packages</title> </head> <body> <div class="zz-skip-header"><a href="#BEGIN">Skip Headers</a></div> <table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%"> <col width="86%" /> <col width="*" /> <tr valign="bottom"> <td align="left"></td> <td align="center"><a href="tdddg_subprograms001.htm"><img width="24" height="24" src="./dcommon/gifs/leftnav.gif" alt="Previous" /><br /> <span class="icon">Previous</span></a> </td> <td align="center"><a href="tdddg_subprograms003.htm"><img width="24" height="24" src="./dcommon/gifs/rightnav.gif" alt="Next" /><br /> <span class="icon">Next</span></a></td> </tr> </table> <p><a id="BABHHHIC" name="BABHHHIC"></a><a id="TDDDG99991" name="TDDDG99991"></a></p> <div class="sect1"><!-- infolevel="all" infotype="General" --> <h1>About Packages</h1> <a name="BEGIN" id="BEGIN"></a> <p>A <a id="sthref319" name="sthref319"></a><span class="bold">package</span> is a PL/SQL unit that consists of related subprograms and the explicit cursors and variables that they use.</p> <p><a id="sthref320" name="sthref320"></a>Oracle recommends that you put your subprograms into packages. Some of the reasons are:</p> <ul> <li> <p>Packages allow you to hide implementation details from client programs.</p> <p>Hiding implementation details from client programs is a widely accepted best practice. Many Oracle customers follow this practice strictly, allowing client programs to access the database only by calling PL/SQL subprograms. Some customers allow client programs to use <code>SELECT</code> statements to retrieve information from database tables, but require them to call PL/SQL subprograms for all business functions that change the database.</p> </li> <li> <p>Packaged subprograms must be qualified with package names when invoked, which ensures that their names will always work.</p> <p>For example, suppose that you developed a schema-level procedure named <code>CONTINUE</code> before Oracle Database 11<span class="italic">g</span> Release 1 (11.1). Release 11.1 introduced the <code>CONTINUE</code> statement. Therefore, if you ported your code to 11.1, it would no longer compile. However, if you had developed your procedure inside a package, your code would refer to the procedure as <code><span class="codeinlineitalic">package_name</span></code>.<code>CONTINUE</code>, so the code would still compile.</p> </li> <li> <p>Packaged subprograms can send and receive records and collections.</p> <p>Standalone stored subprograms can send and receive only scalar <a id="sthref321" name="sthref321"></a>parameters—single values with no internal components, such as <code>VARCHAR2</code>, <code>NUMBER</code>, and <code>DATE</code>.</p> </li> </ul> <div class="helpinfonote"> <p><span class="bold">Note: </span>Oracle Database supplies many PL/SQL packages to extend database functionality and provide PL/SQL access to SQL features. You can use the supplied packages when creating your applications or for ideas in creating your own stored procedures. For information about these packages, see <a href="javascript:open('http://www.oracle.com/pls/db112/lookup?id=ARPLS','newWindow').focus()"><span class="italic">Oracle Database PL/SQL Packages and Types Reference</span></a>.</p> </div> <div class="helpinfonotealso"> <h2>Related Topics</h2> <p><a href="javascript:open('http://www.oracle.com/pls/db112/lookup?id=CNCPT1784','newWindow').focus()"><span class="italic">Oracle Database Concepts</span></a></p> <p><a href="javascript:open('http://www.oracle.com/pls/db112/lookup?id=LNPLS00902','newWindow').focus()"><span class="italic">Oracle Database PL/SQL Language Reference</span></a> for more reasons to use packages</p> <p><a href="javascript:open('http://www.oracle.com/pls/db112/lookup?id=LNPLS009','newWindow').focus()"><span class="italic">Oracle Database PL/SQL Language Reference</span></a> for complete information about PL/SQL packages</p> <p><a href="javascript:open('http://www.oracle.com/pls/db112/lookup?id=ARPLS','newWindow').focus()"><span class="italic">Oracle Database PL/SQL Packages and Types Reference</span></a></p> <p><a href="tdddg_subprograms.htm#CIHDFDJG">Developing Stored Subprograms and Packages</a></p> </div> </div> <!-- class="sect1" --> <!-- Start Footer --> <div class="footer"> <table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%"> <col width="86%" /> <col width="*" /> <tr> <td align="left"><span class="copyrightlogo">Copyright © 1996, 2009, Oracle and/or its affiliates. All rights reserved.</span><br /> <a href="./dcommon/html/cpyr.htm"><span class="copyrightlogo">Legal Notices</span></a></td> <td align="center"><a href="tdddg_subprograms001.htm"><img width="24" height="24" src="./dcommon/gifs/leftnav.gif" alt="Previous" /><br /> <span class="icon">Previous</span></a> </td> <td align="center"><a href="tdddg_subprograms003.htm"><img width="24" height="24" src="./dcommon/gifs/rightnav.gif" alt="Next" /><br /> <span class="icon">Next</span></a></td> </tr> </table> </div> <!-- class="footer" --> </body> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de