CREATE_COLLECTION Procedure

Use this procedure to create an empty collection that does not already exist. If a collection exists with the same name for the current user in the same session for the current Application ID, an application error is raised.

Syntax

APEX_COLLECTION.CREATE_COLLECTION(
    p_collection_name IN VARCHAR2);

Parameters

Table 4-7 describes the parameters available in the CREATE_COLLECTION procedure.


Table 4-7 CREATE_COLLECTION Procedure Parameters

Parameter Description

p_collection_name

The name of the collection. The maximum length is 255 characters. An error is returned if this collection exists with the specified name of the current user and in the same session.


Example

This example shows how to use the CREATE_COLLECTION procedure to create an empty collection named EMPLOYEES.

Begin
    APEX_COLLECTION.CREATE_COLLECTION(
        p_collection_name => 'EMPLOYEES');
End;