IntermediateBasic SELECT
Add a UNIQUE constraint
The query
SQL
ALTER TABLE employees
ADD CONSTRAINT unique_email UNIQUE (email);Note
“Ensures all values in the email column are distinct. Automatically creates a unique B-tree index.
ALTER TABLE employees
ADD CONSTRAINT unique_email UNIQUE (email);Note
“Ensures all values in the email column are distinct. Automatically creates a unique B-tree index.