create index

Add a new index (key) to a table

Syntax

create_index:
        CREATE INDEX constraint_name [USING {B_TREE | HASH} | AVL_TREE | R_TREE]
        ON [database_name.]table_name
             (column_name [ASC | DESC] [, column_name [ASC | DESC]]...)

Description

A CREATE INDEX statement is commonly available in many SQL systems but is not specified as part of the ISO/ANSI SQL Standard. RDM SQL does provide a CREATE INDEX but it is simply a different syntactic wrapper for the standard ALTER TABLE statement. The syntax shown above actually maps directly to the syntax shown below.

ALTER TABLE [database_name.]table_name
ADD CONSTRAINT constraint_name [UNIQUE] KEY [USING {B_TREE | HASH}]
     (column_name [ASC | DESC] [, column_name [ASC | DESC]]... )

See Also

ALTER TABLE

Indexing Methods