Edit D:\app\Administrator\product\11.2.0\dbhome_1\apex\images\doc\advnc_coll_create.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"> <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" /> <title>Creating a Collection</title> <meta name="generator" content="Oracle DARB XHTML Converter (Mode = ohj/ohw) - Version 5.1" /> <meta name="date" content="2009-04-14T16:11:31Z" /> <meta name="robots" content="noarchive" /> <meta name="doctitle" content="Creating a Collection" /> <meta name="relnum" content="Release 3.2" /> <meta name="partnum" content="E11947-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="up" href="preface.htm" title="Home" type="text/html" /> <link rel="up" href="advnc.htm" title="Advanced Programming Techni..." type="text/html" /> <link rel="up" href="advnc_collections.htm" title="Using Collections" type="text/html" /> <link rel="up" href="advnc_coll_create.htm" title="Creating a Collection" type="text/html" /> <link rel="prev" href="advnc_coll_api.htm" title="Previous" type="text/html" /> <link rel="next" href="advnc_coll_trunc.htm" title="Next" type="text/html" /> </head> <body> <p id="BREADCRUMBING"><a href="preface.htm" title="Home">Home</a> > <a href="advnc.htm" title="Advanced Programming Techni...">Advanced Programming Techni...</a> > <a href="advnc_collections.htm" title="Using Collections">Using Collections</a> > Creating a Collection</p> <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="advnc_coll_api.htm"><img src="dcommon/gifs/leftnav.gif" alt="Previous" /><br /> <span class="icon">Previous</span></a> </td> <td align="center"><a href="advnc_coll_trunc.htm"><img src="dcommon/gifs/rightnav.gif" alt="Next" /><br /> <span class="icon">Next</span></a></td> </tr> </table> <p><a id="BABGHJFD" name="BABGHJFD"></a></p> <div class="sect2"><!-- infolevel="all" infotype="General" --> <h1><a name="HTMDB25859" id="HTMDB25859"></a>Creating a <a id="sthref2192" name="sthref2192"></a>Collection</h1> <p>Every collection contains a named list of data elements (or members) which can have up to 50 character attributes (<code>VARCHAR2(4000)</code>), and one large character attribute (<code>CLOB</code>). You use the following methods to create a collection:</p> <ul> <li> <p><code>CREATE_COLLECTION</code></p> </li> <li> <p><code>CREATE_OR_TRUNCATE_COLLECTION</code></p> </li> <li> <p><code>CREATE_COLLECTION_FROM_QUERY</code></p> </li> <li> <p><code>CREATE_COLLECTION_FROM_QUERY_B</code></p> </li> </ul> <p>The <code>CREATE_COLLECTION</code> method raises an exception if the named collection exists, for example:</p> <pre xml:space="preserve" class="oac_no_warn"> <a id="sthref2193" name="sthref2193"></a>APEX_COLLECTION.CREATE_COLLECTION( p_collection_name => collection name ); </pre> <p>The <code>CREATE_OR_TRUNCATE_COLLECTION</code> method creates a collection if the named collection does not exist. If the named collection exists, this method truncates it. Truncating a collection empties it, but leaves it in place, for example:</p> <pre xml:space="preserve" class="oac_no_warn"> <a id="sthref2194" name="sthref2194"></a>APEX_COLLECTION.CREATE_OR_TRUNCATE_COLLECTION( p_collection_name => collection name); </pre> <p>The <code>CREATE_COLLECTION_FROM_QUERY</code> method creates a collection and then populates it with the results of a specified query, for example:</p> <pre xml:space="preserve" class="oac_no_warn"> <a id="sthref2195" name="sthref2195"></a>APEX_COLLECTION.CREATE_COLLECTION_FROM_QUERY( p_collection_name => collection name, p_query => your query , p_generate_md5 => 'YES' or 'NO' ); </pre> <p>The <code>CREATE_COLLECTION_FROM_QUERY_B</code> method also creates a collection and then populates it with the results of a specified query, for example:</p> <pre xml:space="preserve" class="oac_no_warn"> <a id="sthref2196" name="sthref2196"></a>APEX_COLLECTION.CREATE_COLLECTION_FROM_QUERY_B( p_collection_name => collection name, p_query => your query ); </pre> <p>The <code>CREATE_COLLECTION_FROM_QUERY_B</code> method offers significantly faster performance than the <code>CREATE_COLLECTION_FROM_QUERY</code> method by performing bulk SQL operations, but has the following limitations:</p> <ul> <li> <p>No column value in the select list of the query can be more than 2,000 bytes. If a row is encountered that has a column value of more than 2,000 bytes, an error will be raised during execution.</p> </li> <li> <p>The MD5 checksum will not be computed for any members in the collection.</p> </li> </ul> <div class="sect3"><!-- infolevel="all" infotype="General" --><a id="sthref2197" name="sthref2197"></a> <h2><a name="HTMDB25860" id="HTMDB25860"></a>About the Parameter p_generate_md5</h2> <p>Use the <code>p_generate_md5</code> flag to specify if the message digest of the data of the collection member should be computed. By default, this flag is set to <code>NO</code>. Use this parameter to check the MD5 of the collection member (that is, compare it with another member or see if a member has changed).</p> <div align="center"> <div class="inftblnotealso"><br /> <table class="NoteAlso oac_no_warn" summary="" cellpadding="3" cellspacing="0"> <tbody> <tr> <td align="left"> <p class="notep1">See Also:</p> <a href="advnc_coll_status.htm#BABIAEDH">"Determining Collection Status"</a> for information about using the <code>GET_MEMBER_MD5</code> function</td> </tr> </tbody> </table> <br /></div> <!-- class="inftblnotealso" --></div> </div> <!-- class="sect3" --></div> <!-- class="sect2" --> <!-- 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 © 2003, 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="advnc_coll_api.htm"><img src="dcommon/gifs/leftnav.gif" alt="Previous" /><br /> <span class="icon">Previous</span></a> </td> <td align="center"><a href="advnc_coll_trunc.htm"><img 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