Difference between primary key and unique key ?

Answer Posted / tom

There is two difference between them.

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 ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we commit inside a function in oracle?

562


Respected sir, Please send me technical questions related to oracle apps..

1383


What is bulk copy or bcp in oracle?

613


Explain view?

582


Can we save images in a database and if yes, how?

594






What is dynamic proxy?

554


What is ASM (Automatic Storage Management) in Oracle?

715


What is oracle join syntax?

574


What are the uses of linked server and explain it in detail?

588


How do I spool in oracle?

545


Can the query output be sorted by multiple columns in oracle?

574


What is the difference between sharding and replication?

480


How to start instance with a minimal initialization parameter file?

542


Select all the employees who were hired in last 2 years and who works in dept where max managers are working.

2458


How to initialize variables with default values?

638