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.
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,
LastName varchar(255) NOT NULL,
If you have any query on database management system then comment your questions