Below are the examples of CREATE INDEX in Oracle.

Create a Unique Index

In the following example, it will create a unique index on the EMP table for column EMPNO.

CREATE UNIQUE INDEX emp_unique_index
ON EMP (EMPNO)
/

Create a Non-Unique Index

In the following example, it will create a non-unique index on the EMP table for columns EMPNO, ENAME, and JOB.

CREATE INDEX emp_nonunique_index ON EMP
(EMPNO, ENAME, JOB)
/

See also:

Vinish Kapoor

An Oracle Apex Consultant, Oracle ACE, and founder of foxinfotech.in and orclqa.com a question and answer forum for developers.

Leave a Reply