What is the diff. bwt. primary key and unique key?

Answers were Sorted based on User's Feedback



What is the diff. bwt. primary key and unique key?..

Answer / janhvee

diff. between primary key and unique is unique key can be
null but primary key can't be null.

one table can have only one primary key but unique key can
be multiple keys

Is This Answer Correct ?    17 Yes 0 No

What is the diff. bwt. primary key and unique key?..

Answer / rakesh ranjan

IN PRIMARY KEY IS ONLY IN ANY TABLE BUT WHEN WE TALKING
ABOUT UNIQUE KEY, IT CAN BE NULL.

Is This Answer Correct ?    5 Yes 1 No

What is the diff. bwt. primary key and unique key?..

Answer / jeyaprakash

primary is not allow null value.but unique can be allow null
value

Is This Answer Correct ?    3 Yes 0 No

What is the diff. bwt. primary key and unique key?..

Answer / sonu kumar

primary of any table can't be null but unique can be
primary key may be a unique key but unique can't be a primary key b/c primary key of any relation cant be a null value

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More MySQL Interview Questions

How to run a sql statement?

0 Answers  


Consider you have the following three tables which have to be linked together.

0 Answers  


What is the current version of mysql?

0 Answers  


What is the maximum size of table in mysql?

0 Answers  


Where is mysql data stored?

0 Answers  


What is the difference between mysql_connect and mysqli_connect?

0 Answers  


How to include numeric values in sql statements?

0 Answers  


What do I do if I forgot my mysql root password?

0 Answers  


how to connect a php script with the mysql database?

0 Answers  


Should I use pdo or mysqli?

0 Answers  


Hi Team, This is kartik, I recently completed my B-tech. Importance of posting this question is for to know the best books on SQL(MYSQL/Oracle)? I like SQL concept's so much, at the same time i decided to choose SQL for my career purpose. So please suggest me the best books that are very helpful for a fresher to improve concepts like (SQL/PLSQL)Basics, programming concepts, architectures etc. Please consider my request as an important one. I am very thankful to you for providing this opportunity. If possible can you please send the names of books for my personal id also: karthikgdv1206@yahoo.com. Thanks, Kartik T

0 Answers  


What are the different types of triggers in mysql?

0 Answers  


Categories