The IN_DB_UTIL_SP_DROP_INDEX stored procedure is used to drop indexes on the specified table. This procedure is intended to be used by the IN_DB_UPGRADE package for schema upgrade actions.
This procedure cannot be used to drop a primary key constraint (clustered index).
Parameter | Description | |
---|---|---|
TABLE_NAME | Type: | INPUT |
Datatype: | SYSNAME | |
Default Value: | NULL | |
Description | The name of the table for which to drop its indexes. If no index name is specified then all non-clustered indexes will be dropped for the specified table. | |
INDEX_NAME | Type: | INPUT |
Datatype: | SYSNAME | |
Default Value: | NULL | |
Description | The name of the index to drop. If no index name is specified then all non-clustered indexes will be dropped for the specified table. | |
DEBUG | Type: | INPUT |
Datatype: | NVARCHAR(3) | |
Default Value: | NO | |
Description | Specifies whether to display additional debugging information during execution, including background operations such as session setup and state changes and call stack details. | |
Options | YES = Display additional details to the Messages tab NO = Do not display additional details to the Message tab |
|
V_RETURN_VAL | Type: | OUTPUT |
Datatype: | INTEGER | |
Default Value: | 0 | |
Description | Specifies whether the execution of the procedure was successful or
not. 0 = Success 1 = Error |
Examples
DECLARE @V_RETURN_VAL INT EXEC @V_RETURN_VAL = IN_DROP_INDEX 'IN_AUDIT' PRINT @V_RETURN_VAL EXEC IN_DROP_INDEX 'IN_AUDIT' EXEC IN_DROP_INDEX 'IN_AUDIT', 'AUDIT_IDX_01'