Icon ALTER INDEX

Alters an existing index on a given table.

Syntax
ALTER INDEX <Name> ON <TableName>|<ViewName>
(<ColumnName> [COLLATE <CollationName>]
   [[ASC|ASCENDING]|[DESC|DESCENDING]] [,<ColumnName>])
[DESCRIPTION <Description>]
[NO BACKUP FILES]

Usage
Use this statement to alter an existing index in a table or non-updateable view.

Information All clauses after the column definitions are optional. If they are not specified, then they will not be altered and will stay the same as before the ALTER INDEX statement was executed.

The NO BACKUP FILES clause is optional. Unless this clause is specified, ElevateDB will create backup files (*.old) of any physical table files that were altered during the execution of the statement. Also, this clause does not apply to physical backup files created for the database catalog, which are always created and retained.

As of ElevateDB 2.21, you can now index non-updateable views. Non-updateable views are views that generate a static, insensitive result set.

Examples
-- The following statement changes the Name index on the
-- Customer table so that the Name column is sorted case-insensitive

ALTER INDEX "Name" ON "Customer" (Name COLLATE "ANSI_CI" ASC)

Required Privileges
The current user must be granted the ALTER privilege on the specified table in order to execute this statement. Please see the User Security topic for more information.

SQL 2003 Standard Deviations
This statement deviates from the SQL 2003 standard in the following ways:

DeviationDetails
ExtensionThis SQL statement is an ElevateDB extension.
Image