ST_drop_index

Use this stored procedure to drop a spatial index.

Authorization

The user ID under which the stored procedure is invoked must have one of the following authorities or privileges:
  • SYSADM or DBADM authority on the database that contains the table where the spatial grid index will be used
  • Ownership or INDEX privilege on the table

Syntax

Read syntax diagramSkip visual syntax diagramsysproc.ST_drop_index(index_schemanull,index_name, msg_code,msg_text)

Parameters

index_schema
Identifies the schema to which the index that is specified in the index_name parameter belongs. Although you must specify a value for this parameter, the value can be null. If this parameter is null, the value in the CURRENT SCHEMA special register is used as the schema name for the index.

The index_schema value is converted to uppercase unless you enclose it in double quotation marks.

The data type of this parameter is VARCHAR(128) or, if you enclose the value in double quotation marks, VARCHAR(130).

index_name
Identifies the name of the index that is to be dropped. You must specify a non-null value for this parameter.

The index_name value is converted to uppercase unless you enclose it in double quotation marks.

The data type of this parameter is VARCHAR(128) or, if you enclose the value in double quotation marks, VARCHAR(130).

Output parameters

msg_code
Specifies the message code that is returned from the stored procedure. The value of this output parameter identifies the error, success, or warning condition that was encountered during the processing of the procedure. If this parameter value is for a success or warning condition, the procedure finished its task. If the parameter value is for an error condition, no changes to the database were performed.

The data type of this output parameter is INTEGER.

msg_text
Specifies the actual message text, associated with the message code, that is returned from the stored procedure. The message text can include additional information about the success, warning, or error condition, such as where an error was encountered.

The data type of this output parameter is VARCHAR(4096).

When the message code that is returned is 0 (zero), the message text parameter is set to null.

Example

This example shows how to use a Db2 CALL statement to invoke the ST_drop_index stored procedure. This example uses a Db2 CALL statement to drop the spatial index named INDEXDEMO:
call sysproc.ST_drop_index(NULL,'INDEXDEMO',?,?) 

The two question marks at the end of this CALL statement represent the output parameters, msg_code and msg_text. The values for these output parameters are returned after the stored procedure is called.