15.2 ADD_MEMBER Procedure
Adds a new member to an existing collection. An error occurs 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.
Syntax
APEX_COLLECTION.ADD_MEMBER (
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' )
Parameters
Note:
Any character attribute exceeding 4,000 characters is truncated to 4,000 characters.
Parameter | Description |
---|---|
p_collection_name |
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. |
p_clob001 |
Use for collection member attributes that exceed 4,000 characters. |
p_blob001 |
Use for binary collection member attributes. |
p_xmltype001 |
Use to store well-formed XML. |
p_generate_md5 |
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.
|
Example
APEX_COLLECTION.ADD_MEMBER(
p_collection_name => 'GROCERIES'
p_c001 => 'Grapes',
p_c002 => 'Imported',
p_n001 => 125,
p_d001 => sysdate );
END;
See Also:
Parent topic: APEX_COLLECTION