Creates an index on columns in a specified table.
Category: | Data Definition |
Supports: | EXECUTE Statement |
Data source: | SAS data set, SPD Engine data set, SPD Server table, Aster, DB2 under UNIX and PC, Greenplum, MDS, MySQL, ODBC, Oracle, PostgreSQL, SAP HANA, Sybase IQ, Teradata |
creates a unique index on a table.
specifies the name of the index.
Restriction | For SAS data sets – If you are creating an index on one column only, then index must be the same as column. If you are creating an index on more than one column, then index cannot be the same as any column in the table. |
specifies the name of the table that contains the column or columns to be indexed.
specifies the name of the column to which the index applies. Specify two or more column names to create a composite index.
Tip | If you search two or more columns as a unit or if you have queries that involve only specific columns, use composite indexes. |
Rows are sorted from the smallest value to the largest value. This is the default value.
Alias | ASC |
Note | This option is not valid for Base data sets, SPD Engine data sets, and SPD Server tables. |
Rows are sorted from the largest value to the smallest value.
Alias | DESC |
Note | This option is not valid for Base data sets, SPD Engine data sets, and SPD Server tables. |