What's the difference between (NOT NULL + UNIQUIE) and Primary key.? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

What's the difference between (NOT NULL + UNIQUIE) and Primary key.?

Is it provided for saving time and space? I means just for ease?

1st Dec 2018, 12:16 AM
Kishor Jena
Kishor Jena - avatar
1 Resposta
+ 10
ā— In unique constraint U can have null values , but in primary key constraint U can't have null values . ā— Duplicate values is not allowed in both . ā— U can say Primary key cons. = Unique & not-null together .
1st Dec 2018, 5:22 AM
Gaurav Agrawal
Gaurav Agrawal - avatar