What is the difference between primary and unique key

Answers were Sorted based on User's Feedback



What is the difference between primary and unique key..

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

What is the difference between primary and unique key..

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

What is the difference between primary and unique key..

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

What is the difference between primary and unique key..

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

What is the difference between primary and unique key..

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

Post New Answer

More MySQL Interview Questions

Write a query to select all teams that won either 1, 3, 5 or 7 games.

0 Answers  


How to Change a users password from unix shell.

0 Answers  


What is prepared statement in mysql?

0 Answers  


change column name and make a unique column so we get no dupes.

0 Answers  


How to check server status with 'mysqladmin'?

0 Answers  






What you can use regular expression for in mysql?

0 Answers  


Explain MySQL architecture?

1 Answers  


How to create trigger in mysql workbench?

0 Answers  


Where is the mysql config file?

0 Answers  


What is difference between mysql and mysqli?

0 Answers  


Is there a free version of mysql?

0 Answers  


What are different types of queries?

0 Answers  


Categories