Creates an index on one or more columns in a table.
Transact-SQL Syntax
create [unique][clustered | nonclustered] index index_name
on [[database.]owner.]table_name(column_name [, column_name]...)
[with {{fillfactor | max_rows_per_page} = x, ignore_dup_key, sorted_data, [ignore_dup_row | allow_dup_row]}]
[on segment_name]
ODBC Syntax
CREATE [UNIQUE] INDEX index_name
ON base_table_name
(column_identifier[ASC|DESC] [,column_identifier[ASC|DESC]]...)
create index au_id_ind on authors (au_id)
create index ind1 on titleauthor (au_id, title_id)
create nonclustered index zip_ind on authors (zip) with fillfactor = 25
Adaptive Server/CIS sends the create index command to the DirectConnect server as a language event.
Columns of type bit, text, and image cannot be indexed.
You cannot create an index on a view.
on segment
The ODBC command ASC|DESC cannot be generated by transformation. Only ascending indexes can be created.