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

maximum database size of mysql database

2 Answers  


Give the syntax of GRANT commands?

3 Answers  


What are the different table present in MYsql?

3 Answers  


Explain MySQL architecture?

1 Answers  


i made a table in sql server 2000 and in a column i want to add image path of a picture present in my hardisk... so using insert statement how will i insert the path of the image in the table??

1 Answers   WebTech,






What is RMS Migrations

0 Answers   Steria,


Can you save your connection settings to a conf file?

1 Answers  


how fastest access of data can be done from database ?

3 Answers  


What is Foreign Key? What is the main difference between primary key and Foreign Key ? How Foreign Key can be defined? Is Foreign key is used to join two or more table?

4 Answers  


How can you do the fine tunning?

3 Answers   ACC,


The structure of table view buyers is as follows: +----------------+-------------+------+-----+---------+----- -----------+ | Field | Type | Null | Key | Default | Extra | +----------------+-------------+------+-----+---------+----- -----------+ | user_pri_id | int(15) | | PRI | NULL | auto_increment | | userid | varchar(10) | YES | | NULL | | +----------------+-------------+------+-----+---------+----- -----------+ the value of user_pri_id the last row 2345 then What will happen in the following conditions? Condition1: Delete all the rows and insert another row then. What is the starting value for this auto incremented field user_pri_id , Condition2: Delete the last row(having the field value 2345) and insert another row then. What is the value for this auto incremented field user_pri_id

2 Answers  


If you specify the data type as DECIMAL (5,2), what?s the range of values that can go in this table?

2 Answers  






Categories