Previous |
Next |
To create an index, use either the SQL Developer tool Create Index or the DDL statement CREATE
INDEX
.
This tutorial shows how to use the Create Index tool to add an index to the EVALUATIONS
table (created in "Creating Tables with the CREATE TABLE Statement"). The equivalent DDL statement is:
CREATE INDEX EVAL_JOB_IX ON EVALUATIONS (JOB_ID ASC) NOPARALLEL;
To add an index to the EVALUATIONS table using the Create Index tool:
On the Connections tab, expand hr_conn.
Under the hr_conn
icon, a list of schema object types appears.
Expand Tables.
A list of tables appears, including EVALUATIONS
.
Right-click EVALUATIONS.
A list of choices appears.
Select Index.
A list of choices appears.
Select Create Index.
The Create Index window opens.
For Schema, accept the default, HR
.
For Name, type EVAL_JOB_IX
.
Select the tab Definition.
The Definition pane shows the default values for index properties.
In the field labeled "Column Name or Expression:", type JOB_ID
.
(For all other properties, accept the default values.)
Click OK.
Now the EVALUATIONS
table has an index named EVAL_JOB_IX
on the column JOB_ID
.