what is the difference between unique and primary key
Answers were Sorted based on User's Feedback
Answer / ravi kanth
Primary key is the combination of unique and not null.But
unique key accepts null values also.
| Is This Answer Correct ? | 6 Yes | 1 No |
Answer / suresh kumar somayajula
Unique Key allows NULL value and a table can have more than
one UNIQUE KEY Constraint.
Primary Key is the combination of UNIQUE+NOT NULL,means it
won't allow NULL Values and a table can have only one
Primary Key.But a table can have Composite Primary Key.
Thank you,
Suresh
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / priyanka
Both are uniqe identification keys but Primary key should
not be null but uniqe key should.
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / divyarao
primary key accepts only values which has no duplication ,and does not accept null values . for a a table there should be only one primary key constraint.
whereas in unique key ,it accepts null values .here also there should not be any duplication ,a table may have more than one unique key constarint
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / vinod
uniqe key allow one null value only but primary key cannot
allow any null value
| Is This Answer Correct ? | 0 Yes | 1 No |
Enlist some commands of ddl, dml, and dcl.
hello to all i want code for like this site "Submit Question" page.please give answers thanks.
What are new features postgre 9.1?
What is index hunting and how does it help in improving query performance?
What will the SHOW_ALERT function returns ?
3 Answers College School Exams Tests, DSS,
which is the best institute to learn Oracle DBA 10g/11g, please advise, someone?
What are the ways to tune reporting services?
What is the structure of a table in database?
What do you understand by database triggers?
What is database management used for?
What is Full Backup ?
what is datapump? Difference between exp and expdp?
2 Answers Capital IQ, TCS, WNS,
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)