What is the difference between primary and unique key
Answers were Sorted based on User's Feedback
Answer / venkat rao
Unique key takes null value but primary key doesnot take
null value
primary key have properties of both null key and unique key
constraints
Is This Answer Correct ? | 21 Yes | 4 No |
Answer / sudhanshu_kmr
.....primary key.......... unique key
at most one column .....:... any number of column
only unique values........... only unique values
don't accept null........... accept null
Is This Answer Correct ? | 3 Yes | 2 No |
Answer / ashish asthana
Primay key restrict the duplicacy in the records and does
not accept null value or there are only one primary key in
a table
Unique constraint also restict the duplicacy but it accept
the null value one or more then one. We can apply unique
constraint more than one column
Is This Answer Correct ? | 2 Yes | 2 No |
Answer / durai
primary key is does not allow duplicate which is contain not
null it is only once we can use in table
unique key allow null value
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / pradeep rajpoot
primary key no null value allow.
but unique key one null value is allow
Is This Answer Correct ? | 0 Yes | 4 No |
What is the insert?
What is the default port for MySQL Server?
How do I disable mysql?
Can you shard mysql?
What is max connections in mysql?
What is mysql port?
What is difference between mysql and mariadb?
What are aggregate functions in mysql?
What is unique key in mysql?
Does insert statement lock the table?
What is mysql data directory?
Is mysql same as sql?