IntermediatePerformance & Indexes
Create a UNIQUE index
The query
SQL
CREATE UNIQUE INDEX idx_unique_ssn
ON employees (ssn);Note
“Functions identically to a UNIQUE constraint but is explicitly created as an index. Prevents duplicate values.
CREATE UNIQUE INDEX idx_unique_ssn
ON employees (ssn);Note
“Functions identically to a UNIQUE constraint but is explicitly created as an index. Prevents duplicate values.