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

what if you really want to store the timestamp data, such as the publication date of the article?

2 Answers  


What is the difference between a Table and a View?

3 Answers  


Explain the architecture models of SQL Server?

0 Answers  


How do you index just the first four bytes of the column?

2 Answers  


how we can find nth max salary from an employe table by using my sql?

8 Answers  






What happens when the column is set to AUTO INCREMENT and you reach the maximum value for that table?

2 Answers  


How do you control the max size of a HEAP table?

1 Answers  


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

4 Answers  


What is the difference between char and varchar data types?

6 Answers  


In a property booking section want a query to check that property is booked from StartDate to EndDate.Booking Table field are given id proerty_id start_date checkout_date no_of_visitor booking date status Waiting yours answer.. Thanks In Advance...

1 Answers  


What is diff b/w MYISAM and INNODB storage engine. and also define the benifits and drawbacks of both storage engine

1 Answers  


Explain MySQL architecture?

1 Answers  






Categories