CREATE UNIQUE INDEX

SQL CREATE UNIQUE INDEX Keyword

The CREATE UNIQUE INDEX command is used to create an index on a column that does not allow duplicate values. Indexes are used to improve the speed of data retrieval without changing the visible structure of the table.

Tutorials dojo strip

SQL CREATE UNIQUE INDEX Syntax

SQL

SQL CREATE UNIQUE INDEX Example

This creates a unique index named uidx_patientid on the patient_id column of the Patients table. The index enforces uniqueness which means no two records can have the same patient_id.

SQL

SQL CREATE UNIQUE INDEX Labs

Tutorials dojo strip