ALTER INDEX

From Recital Documentation Wiki
Revision as of 14:14, 19 March 2009 by Yvonnemilne (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

ALTER INDEX

Class

SQL Applications


Purpose

Rebuilds an existing index file for the specified table


Syntax

ALTER INDEX <index> ON <table> REBUILD [SHARED | EXCLUSIVE]


See Also

ALTER TABLE, CREATE INDEX, CREATE TABLE, DROP INDEX, SET TCACHE


Description

The ALTER INDEX command is used to rebuild an existing index file for the specified table. The table must be able to be locked for exclusive use during the operation.


Keywords Description
index This is the name of the index being rebuilt.
table This is the name of the table for which the index will be rebuilt on.
REBUILD Create the index anew using the existing index
SHARED Allows read-only transactions on the table while the index is being rebuilt.
EXCLUSIVE Prevents any transactions on the table while the index is being rebuilt.


Example

// Rebuild the index staff_no index on staff table
ALTER INDEX staff_no
ON staff
REBUILD
SHARED;


Products

Recital Database Server, Recital Mirage Server, Recital Terminal Developer