Difference between primary key and unique key ?

Answer Posted / alok

There is only two Point:
1. The not null constraint is by default added to primary key, it means, primary key attribute cannot accept null values, whereas, the attribute declared as unique can accept null values. It is the major difference between the two.
2. Secondly, we can have only one primary key in a relation, whereas, multiple attributes can be declared unique at the same time.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to count groups returned with the group by clause in oracle?

814


Please explain oracle data types with examples?

780


What's dateware house and what's clustor with practicle example

1898


Explain how you would restore a database using RMAN to Point in Time?

1875


Explain what are the characteristics of data files?

805


What is an oracle user account?

749


Will you be able to store pictures in the database?explain.

739


Describe the types of sub query?

743


Explain the use of grant option in exp command.

755


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

787


How can we find out the current date and time in oracle?

823


How to execute the package in oracle?

802


What are the types of partitions in oracle?

762


what are the default admin accounts in Oracle 10g ?

747


How do I uninstall oracle 11g?

786