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
Can we delete records from view?
How do you simulate the explain of an embedded sql statement in spufi/qmf?
What is a plan and package in db2?
What is table space in db2?
How to restart a DB2 program?
How to fetch the last row from the table in SQL (db2)?
Explain how can you do the explain of a dynamic sql statement?
On which levels locks can be applied?
What is the difference between cursor stability and repeatable read isolation levels?
How to get the ddl of a table in db2?
What is reorg and runstats in db2?
How will you return the number of records in table?
What is collection in db2 bind?
Highlight all the advantages that are attached to a package.
Mention the various locks that are available in db2.