6.22 ADD_MEMBER Procedure

Use this procedure to add a new member to an existing collection. An error is raised if the specified collection does not exist for the current user in the same session for the current Application ID. Gaps are not used when adding a new member, so an existing collection with members of sequence IDs (1,2,5,8) adds the new member with a sequence ID of 9.


    p_collection_name IN VARCHAR2,
    p_c001 IN VARCHAR2 default null,
    p_c050 IN VARCHAR2 default null,
    p_n001 IN NUMBER default null,
    p_n002 IN NUMBER default null,
    p_n003 IN NUMBER default null,
    p_n004 IN NUMBER default null,
    p_n005 IN NUMBER default null,
    p_d001 IN DATE default null,
    p_d002 IN DATE default null,
    p_d003 IN DATE default null,
    p_d004 IN DATE default null,
    p_d005 IN DATE default null,
    p_clob001 IN CLOB default empty_clob(),
    p_blob001 IN BLOB default empty_blob(),
    p_xmltype001 IN XMLTYPE default null,
    p_generate_md5 IN VARCHAR2  default 'NO');



Any character attribute exceeding 4,000 characters is truncated to 4,000 characters.

Table 6-1 ADD_MEMBER Procedure Parameters

Parameter Description


The name of an existing collection. Maximum length is 255 bytes. Collection names are not case sensitive and are converted to upper case.

p_c001 through p_c050

Attribute value of the member to be added. Maximum length is 4,000 bytes. Any character attribute exceeding 4,000 characters is truncated to 4,000 characters.

p_n001 through p_n005

Attribute value of the numeric attributes to be added.

p_d001 through p_d005

Attribute value of the date attribute.


Use p_clob001 for collection member attributes that exceed 4,000 characters.


Use p_blob001 for binary collection member attributes.


Use p_xmltype001 to store well-formed XML.


Valid values include YES and NO. YES to specify if the message digest of the data of the collection member should be computed. Use this parameter to compare the MD5 of the collection member with another member or to see if that member has changed.


The following is an example of the ADD_MEMBER procedure.

        p_collection_name => 'GROCERIES'
        p_c001            => 'Grapes',
        p_c002            => 'Imported',
        p_n001            => 125,
        p_d001            => sysdate );