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 to define a cusotmer as a supplier in ORACLE R12

1728


How to write date and time literals in oracle?

555


How to create a table in a specific tablespace?

543


How do you bind variables in oracle?

551


What is Virtual Private Database in Oracle?

626






Explain index?

751


How to turn on or off recycle bin for the instance?

611


What spfile/init.ora file parameter exists to force the CBO to make the execution path of a given statement use an index, even if the index scan may appear to be calculated as more costly?

1525


What is the usage of synonyms?

593


Explain what are synonyms used for?

610


What is oracle server autotrace in oracle?

616


What privilege is needed for a user to query tables in another schema?

510


What is program global area (pga) in oracle?

609


Explain table?

655


What is a select query statement in oracle?

545