What is the difference between “Primary Key” and “Unique Key”?

381 viewsSQLSQL
0

1. We can have only one Primary Key in a table whereas we can have more than one
Unique Key in a table.
2. The Primary Key cannot have a NULL value whereas a Unique Key may have only
one null value.
3. By default, a Primary Key is a Clustered Index whereas by default, a Unique Key is a
unique non-clustered index.
4. A Primary Key supports an Auto Increment value whereas a Unique Key doesn’t
support an Auto Increment value.

Gautam Sarswat Changed status to publish January 11, 2023
Write your answer.

Posted

in

Tags:

Comments

Leave a Reply

Ganesh Ji Arti A Tribute to Dilip Kumar