The below are the key differences between PK and UK .
| S.No |
Primary Key |
Unique Key |
| 1 |
Creates
Clustered index |
Creates
Non-Clustered index |
| 2 |
Null
values are not allowed. |
Allows
only one null value. |
| 3 |
We
can have only one Primary key in a table. |
We
can have more than one unique key in a table. |
| 4 | Primary key can be made foreign key into another table. | Unique key cannot be made foreign key into another table. |
No comments:
Post a Comment