Write one similarity and one difference between UNIQUE and PRIMARY KEY constraints.
Answers
Answered by
6
The difference between a UNIQUE constraint and a Primary Key is that per table you may only have one Primary Key but you may define more than one UNIQUE constraints. Primary Key constraints are not nullable. UNIQUE constraints may be nullable.
When you create a UNIQUE constraint, the database automatically creates a UNIQUE index. For MS SQL Server databases, a PRIMARY KEY will generate a unique CLUSTERED INDEX. A UNIQUE constraint will generate a unique NON-CLUSTERED INDEX.
Similar questions
English,
7 months ago
Math,
7 months ago
Math,
7 months ago
Computer Science,
1 year ago
Business Studies,
1 year ago
Math,
1 year ago
Math,
1 year ago