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 an anonymous procedure without variables?

764


Which dictionary view(s) would you first look at to understand or get a high-level idea of a given Advanced Replication environment?

1691


Write a syntax for update query in oracle?

810


I have a database backup file in .db (ext) form how to conver it into .dmp (ext.) for oracle database

1897


How to install oracle database 10g xe?

787


How to use "out" parameter properly?

838


Define the SGA and: How you would configure SGA for a mid-sized OLTP environment? What is involved in tuning the SGA?

2063


What is where clause in oracle?

776


What is merge statement used for?

775


How to speed up webrick?

840


What happens to the current transaction if the session is killed?

763


What is different types of joins?

782


How would you edit your CRONTAB to schedule the running of /test/test.sh to run every other day at 2PM?

1666


What is the difference between pre-select and pre-query?

863


How many memory layers are in the oracle shared pool?

866