What is UNIQUE Constraint in SQL

The UNIQUE constraint uniquely identifies each row in a table. The restriction which unique enforces in the Uniqueness of values with respect to any column. The UNIQUE and PRIMARY KEY constraints both provide a guarantee for uniqueness for a column or set of columns. UNIQUE Constraint A PRIMARY KEY automatically has a UNIQUE key defined on it. Note that you can have many UNIQUE per tables, but only one PRIMARY KEY per table. CREATE TABLE Persontable ( P_Id int UNIQUE, LastNam...
Read More