What is the difference between Primary key and
unique index?

Answers were Sorted based on User's Feedback



What is the difference between Primary key and unique index?..

Answer / rams

Primary Key is Unique and Not Null. Unique index can be defined on Primary Key or any other Unique column in the table. Unique index can have a Null Value unlike Primary Key.

Is This Answer Correct ?    3 Yes 0 No

What is the difference between Primary key and unique index?..

Answer / guest1

Using the Primary Key you can establish referential
integrity. Unix index will be created upon the Primary Key
column, and the data will be seperately placed in the Index
space. If you have not created Unix Index, while accessing
the table it leads to SQLCODE = -540

Is This Answer Correct ?    1 Yes 0 No

What is the difference between Primary key and unique index?..

Answer / raghunathan

We can have only one Primary Key for a table(including multiple column) but can have any number of unique indexes in a table( limited to number of columns in that table)

Is This Answer Correct ?    1 Yes 0 No

What is the difference between Primary key and unique index?..

Answer / guest

The primary key is used to establish referential integrity
relationship with another table and a Unique index is used
to to enforce uniqueness.

Is This Answer Correct ?    2 Yes 2 No

What is the difference between Primary key and unique index?..

Answer / sunny kalra

Primary key: a relational database constraint. Primary key consists of one or more
columns that uniquely identify a row in the table. For a normalized relation, there
is one designated primary key.

Unique index: a physical object that stores only unique values. There can be one
or more unique indexes on a table.

Is This Answer Correct ?    0 Yes 0 No

What is the difference between Primary key and unique index?..

Answer / ankit

IN PRIMARY KEY WE DO NOT ATTACH UNIQUE INDEX BUT IN UNIQUE
INDEX WE CAN ATTACH PRIMARY KEY

Is This Answer Correct ?    1 Yes 5 No

Post New Answer

More DB2 Interview Questions

How to handle null values in db2

4 Answers  


4. A DB2 application is bound with uncommitted Read isolation level.It issues a request that retrieves 20 rows out of 200000 in the table. Which of the following descrbes the rows that are locked as a result of this request? a. None of the rows are locked. B.The retrieved rows are locked. C.The last row of the result set is locked. D.The rows not previously updated by another application are locked.

3 Answers   Wipro,


What is plan in cobol db2?

0 Answers  


Explain packages.

0 Answers  


Is db2 free?

0 Answers  






When reorg is used?

0 Answers  


DB2: A calls B once sucessfull and second time when it calls says curson is open why is it so?

1 Answers   IBM,


What is query for your birthday date should be in hours,minute and seconds format?

1 Answers   Fidelity,


What is bind plan?

0 Answers  


Is Cursor exicutable ?

3 Answers   TetraSoft,


What happens to a cursor after a commit?

3 Answers  


i want to maintain uniqueness on pdf without make lf??????????

0 Answers  


Categories