Create Index in Oracle Examples

Create Index in Oracle Examples

  • SQL
  • 1 min read

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: