What is the difference between primary key & unique index ?

Answer Posted / palash ghosh

1)Primary key creates an implicit culstered index on a
table, unique key does not create any implicit index.
2)Columns defined as primary key does not allow null values,
where as columns defined as unique can allow null values.
3)A table can have just one primary key (can be a composite
key) where as there can be multiple unique columns (keys).
4)Primary key is a unique key with the above mentioned
features.

Is This Answer Correct ?    9 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can deadlocks be resolved?

542


Define db2.

672


What is copy pending status in db2?

636


What is runstats and reorg in db2?

797


What is a cursor in programming?

594






Can one database have multiple instances?

583


How to check sequence on a table in db2?

600


What r the comman abends in db2, jcl and cobol???????

1818


What does db2 mean?

587


What is runstats utility in db2?

569


What is the use of value function?

628


Explain about dbrm.

607


How do you pull up a query which was previously saved in qmf?

672


What is a Foreign Key?

656


Mention the downsides of page level lock.

707