ODBC Server Reference Manual

Transact-SQL Language
HP NonStop ODBC Server Reference Manual429151-002
4-67
DROP INDEX
DROP INDEX
Use DROP INDEX to remove an index from the database.
The DROP INDEX statement has the following syntax:
table-name
identifies the table in which the indexed column is located. The table must be in the
current catalog—you cannot drop an index from a table in another catalog.
index-name
specifies the index to drop.
If the statement contains errors, the results can be different than if executed using
SQL Server. See Dropping Multiple Indexes.
Examples
The following statement drops three indexes from the EMPLOYEE table:
use test_disk01_persnl
drop index employee.xdeptnum,
employee.xempname,
employee.xempdept
The EMPLOYEE table is registered in the NonStop SQL/MP catalog that is on the
PERSNL subvolume on the disk volume DISK01 on the node TEST.
Dropping Multiple Indexes
If you drop multiple indexes with one DROP INDEX statement and the statement
contains errors, the results may be different than if the statement were executed using
SQL Server.
Because NonStop SQL/MP does not allow you to drop multiple indexes with one
statement, the NonStop ODBC Server translates the DROP INDEX statement to
multiple NonStop SQL/MP DROP INDEX statements. Therefore, even if one of the
statements contains an error, the other statements will be executed and will drop the
specified indexes. In SQL Server, if one of the index-name clauses contains an error,
the statement fails and none of the indexes are dropped.
DROP INDEX table-name.index-name
[ , table-name.index-name ] ...