Progress
SQL-89
Guide and Reference
CREATE INDEX Statement
Creates an index on a table that was created using the SQL Data Definition Language.
[
UNIQUE
]Indicates that all values in the specified column or combination of columns must be unique.
INDEX index-name
The name you want to assign to the index. The index name must be unique within the database, not just within the table.
ON table-name
The name of the table that contains the column or columns you want to index. This table must have been created with the SQL Data Definition Language.
column
The name of a column that you want to index. You can define an index on one or more columns.
EXAMPLEThis example creates the num index.
NOTES
- The index is built immediately for all existing rows in the table.
- If you specify UNIQUE, and all values in the existing rows are not unique, Progress/SQL returns an error message and does not create the index.
- In a unique index, there can be only one record with unknown values in index fields. Therefore, the index fields in an SQL-managed table must all have the _mandatory flag set. If you attempt to create a unique index on an SQL table without all key fields set to _mandatory, Progress/SQL returns the error message:
SEE ALSO
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |