10.49 TRUNCATE_COLLECTION Procedure

Use this procedure to remove all members from a named collection.

If a collection does not exist with the specified name for the current user in the same session and for the current Application ID, an application error is raised.

Syntax

APEX_COLLECTION.TRUNCATE_COLLECTION (
    p_collection_name   IN VARCHAR2);

Parameters

Table 10-25 TRUNCATE_COLLECTION Parameters

Parameter Description
p_collection_name The name of the collection to truncate. An error is returned if this collection does not exist with the specified name of the current user and in the same session.

Example

This example shows how to remove all members from the DEPARTMENTS collection.

BEGIN
    APEX_COLLECTION.TRUNCATE_COLLECTION(
        p_collection_name => 'DEPARTMENTS');
END;