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 commit in db2?
How to connect to db2 database from windows command line?
What is cascading rollback?
Where can you declare a cursor in a cobol-db2 program?
What are sqlcodes –803,-805, -811, -818,-904,-911,-913,-101, +100?
What is alias in db2?
What are the benefits of using the db2 database?
Is ibm db2 free?
What is dclgen in db2?
What is a storage group (stogroup)?
Are views updateable?
What is sqlca?
have 3 tables table1, table2 and table3 which contains employee information. table1 is master table, table2 contains emp details like emp no and so on, table 3 contains emp salary. so if any emp leave company between 25th - 30th of every month it has to get updated in tables. but it is not getting updated. What is the reason.
Can there be more than one cursor open for any program?
What are db2 objects?