Difference between primary key and unique key ?

Answer Posted / sandhya

Primary Key cannot contain null values
Each table has one and only one Primary Key
Primary Key is used to reference as Foreign key while
performing table joins
Clustered index is created on Primary Key

Unique Key can contain null value
A table can have any numberof unique keys
Non-clustered index is created on unique key columns

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

1664


What are the logical operations?

865


Explain the function of optimizer in oracle?

763


What is varray?

768


What is merge statement used for?

742


What is truncate oracle?

709


What is an oracle recycle bin?

707


What privilege is needed for a user to create views in oracle?

781


What query tells you how much space a tablespace named test is taking up, and how much space is remaining?

1979


What is the recommended interval at which to run statspack snapshots, and why?

2639


How to use "for" statements in oracle?

747


What is the use of file param in imp command?

861


What is a data dictionary and how can it be created?

803


How to call a stored function in oracle?

735


How to view the data files in the current database?

788