Previous |
Next |
Use this function to add a new member to an existing collection. Calling this function returns the sequence ID of the newly added member. 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) will add 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') RETURN NUMBER;
Parameters
Table: ADD_MEMBER Function Parameters describes the parameters available in the ADD_MEMBER
function.
Note: Any character attribute exceeding 4,000 characters is truncated to 4,000 characters. |
ADD_MEMBER Function 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. |
|
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. |
|
Attribute value of the numeric attributes to be added. |
|
Attribute value of the date attribute to be added. |
|
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 |
Example
DECLARE l_seq number; BEGIN l_seq := APEX_COLLECTION.ADD_MEMBER( p_collection_name => 'GROCERIES' p_c001 => 'Grapes', p_c002 => 'Imported', p_n001 => 125, p_d001 => sysdate ); END;