Difference between Primary Key & Unique Key:-
Primary Key | Unique Key |
---|---|
Primary Key can't accept null values | Unique key can accept only one null value |
By default, Primary key is clustered index and data in the database table is physically organized in the sequence of clustered index | By default, Unique key is a unique non-clustered index. |
We can have only one Primary key in a table. | We can have multiple unique key in a table. |
Primary key can be made foreign key into another table. | Unique key can not be made foreign key into another table. |