Difference between primary key and unique key ?

Answer Posted / pramod paunikar

Both primary key and unique enforce uniqueness of the
column on which they are defined. But by default primary
key creates a clustered index on the column, where are
unique creates a non-clustered index by default. Another
major difference is that, primary key does not allow NULLs,
but unique key allows only one NULL only.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I decide when to use right joins/left joins or inner joins or how to determine which table is on which side?

816


What is open database communication (odbc) in oracle?

774


What is recycle bin in Oracle?

935


How to commit the current transaction in oracle?

832


How to use fetch statement in a loop?

811


How to write an inner join with the where clause in oracle?

839


What are internal user account in oracle?

783


Write a trigger example in oracle?

831


How to display row numbers with the records?

835


How to get execution statistics reports on query statements?

842


Is there a combination of "like" and "in" in sql?

847


What is index in Oracle?

826


How to create a single index for multiple columns?

796


How to open and close an explicit cursor in oracle?

832


What is Java Pool in Oracle?

875