ERASE command

The ERASE command removes an object (query, index, form, procedure, or table) from the database.

Syntax

>>  -- ERASE ----------- ObjectName ------------------------<<
           +- QUERY -+            ( +- CONFIRM = YES/NO  --+
           +- FORM --+              +- FOLDER = foldername-+
           +- PROC --+
           +- TABLE -+           
Note: You can erase indexes only if you are connected to Cloudant data sources.
Parameter Description
ObjectName The name of the object to remove from the database.
Note: For Cloudant queries, specify the full object key. For Cloudant indexes, specify either the full object key or the design document name and the index name separated by a period (.)
CONFIRM Specifies whether or not to display a confirmation dialog before removing the object. If CONFIRM is not specified or is NO, the corresponding resource limit is used.
FOLDER Specifies the folder in QMF Catalog that stores links to the objects that you want to erase. The default value is provided by the DSQEC_CURR_FOLDER global variable.
Note: If the folder is specified, only a link to the object is removed from the folder and the object remains in QMF Catalog. If the folder is not specified, all links to the object are removed from all folders and the object itself is removed from the database.

Example

The following example erases the query that is stored in QMF Catalog.
ERASE QUERY USER1.QUERY1
The following examples erase a Cloudant query that is stored in a repository:
ERASE QUERY rsbi:/.workspaces/Default/Cloudant_query
ERASE rsbi:/.workspaces/Default/Cloudant_query
The following examples erase a Cloudant index from a database:
ERASE "rsbi:/Cloudant Data Sources/Cloudant/exampleViews/
Secondary Indexes/exampleIndex"
ERASE INDEX exampleViews.exampleIndex