Answer: The UNIQUE Constraint
Explore how to apply and remove UNIQUE constraints on SQL table columns to ensure data uniqueness. Learn to modify tables with ALTER TABLE, add constraints during table creation, and understand best practices for enforcing unique data entries in your database.
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
INSERT INTOstatement is followed by the table name,Employees, which will be modified. TheVALUESclause specifies the values.Line ...