Difference between Primary key and unique key?

Answer Posted / sohini ghosh

In RDBMS, a unique key can uniquely identify each row in a
table, and is closely related to the Super key concept. A
unique key comprises a single column or a set of columns.it
can be null.


A primary key is a special case of unique key. Primary keys
may consist of a single attribute or multiple attributes in
combination.It can't be null..

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is bool mean?

562


How do you pass by reference?

533


How do you do a line break in java?

488


What is the difference between ArrayList and Vector? which one is better in Java

597


Can the interface be final?

570






Can memory leak in java?

577


What is toarray method in java?

552


How do singleton patterns work?

513


What are variable arguments or varargs?

562


How is a variable stored in memory?

523


What is the importance of hashcode() and equals() methods?

574


Can we use this () and super () in a method?

527


What does method mean?

506


What is meant by object oriented programming – oop?

541


How would overload a function based on return type?

544