What is the difference between primary key & unique index ?

Answer Posted / uddipto banerji

1. Primary Key is a column or a set of columns that uniquely identifies a row.Its purpose RECORD UNIQUENESS
2. Primary Key will not allow duplicate values.
3. Primary Key will not allow null.
4. Primary Key is not compulsory but recommended.
5. Primary Key helps to identify one record from another.
6. Only One Primary Key is allowed per table.
7. Unique Indexes is created automatically if there is Primary Key.
8. One table can combine upto 16 columns in a Composite Primary Key.
9. A table can have more than one Unique Key which is not possible in a Primary Key.

Is This Answer Correct ?    10 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is copy pending and check pending in db2?

580


i tried to copy some records from microsoft excel to as-400 physical file through "Bosanova" emulation. Out of 14000 records only 12000 records copies and subsequently programe started to hang. Then, i closed the program forcefully. I did' under stand the problem. Also when i try to compile the physical file it is showing as "The file in use". How to overcome this problem?

2051


Explain dclgen.

728


How to run db2 command in windows?

654


What is rct?

755






What parameters are used to control the free space in DB2?

645


How to restart a DB2 program?

1368


What does db2 blu stand for?

664


How do you stop a db2 database in linux?

570


Define check constraint.

646


What is the difference between db2 and oracle?

683


What is deadlock in db2?

587


What is scrollable cursor in db2?

586


What is a db2 schema?

764


Define sqlca.

651