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 db2 instance?
Can there be more than one cursor open for any program?
While unloading huge amount of data from table. Suddenly job failed some error. Imagine 1M data unloading, In that 90% data unloaded only 10% left, So if want to unload the rest 10% what needs to be done? Whether do i need to start from top or anything ?
Explain the contention situations caused by locks?
How will you return the number of records in table?
Name the various locking levels available?
What is package in db2 mainframe?
What is dclgen (declaration generator)?
what is a corelated subquerry?
What is db2 stogroup?
What is load replace in db2?
How can deadlocks be resolved?
Name the lockable units in DB2?
How can you count the number of rows from a table tab?
What is the difference between oracle and db2?