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
What is explain plan in db2?
Cursors can be declared in both working-storage & procedure division, agreed. But is there any difference? If could you please suggest what is the difference
What is explain in db2?
How can we retrieve the total number of records in RPG & CLLE?
What is the use of runstats in db2?
What is the physical storage length of timestamp data type?
How do I create a view in db2?
Comment whether dclgen is mandatorily used. If not, then what is the point of using it?
How can you find out the # of rows updated after an update statement?
How to find the maximum value in a column in the db2 database?
Explain in detail about buffer manager and its functionalities?
How to find primary key of a table in db2?
How to connect to db2 database from windows command line?
How do I import data from excel to db2?
What is reorg?