The difference between primary key and unique key is given bellow:
Primary Key
Primary Key
- A table can have only one primary key
- A primary key have an implicit NOT NULL constraint
- It cannot contain NULL values
Unique Key
- A table can have more than one unique key
- A unique key have not implicit NOT NULL constraint
- It may or may not contain NULL values
Comments
Post a Comment