Answer: The UNIQUE Constraint
Explore how to effectively use the UNIQUE constraint in SQL to ensure data integrity. This lesson teaches modifying tables with ALTER TABLE to add or remove UNIQUE constraints, applying them to single or multiple columns, and alternatives to ensure uniqueness during data insertion.
Solution
The solution is given below:
Explanation
The explanation of the solution code is given below:
Line 2: The
ALTER TABLEquery modifies a table.ADDis used to add a constraint.UNIQUEtakes in a column name as a parameter and applies a unique constraint on that column.Line 5: The ...