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 maximum size of table in mysql?
What is the difference between char and varchar in mysql?
what is the querry for all managers salary?
Why we use mongodb instead of mysql?
how to display only 4 records from a table based on a condition for ex i have a table called products in that nid,prodname are fields i want to display only any 4 records of perticular product plz tell me
What are features of mysql?
Where is mysql used?
Write a command with which mysql table can be repaired
How to dump a table from a database.
What is row locking in mysql?
Use mysqldump to create a copy of the database?
Can you tell what are various ways to create an index?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)