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


Please Help Members By Posting Answers For Below Questions

What is catalog database in db2?

646


What is dbrm library?

580


What is the advantage in De-normalizing tables in DB2?

749


What is performance tuning db2?

620


Hi Everyone... Under the Logical files, when am working on multiple rec format logical file, I have joined two pf's using the multiple record format logical file concept, but when i run queried the LF only the first mentioned pf records are reflecting and I am not able to see any of the field records specified under the second pf. Kindly let me know whats the reason behind this. Below is the str of LF., R rec PFILE(LOGICAA) CUSTNO CUSTNAME BILL K CUSTNO R rec1 PFILE(LOGICAA1) CUSTNO ADD K CUSTNO .....

1899






by using cursors , we can access particular records from the table based on some condition, i want to delete those selected records, how can we write a query for this in the program?

7523


What is dclgen in db2?

681


Is it possible to create an Instance in DB2 using DB2 Control Center ?

631


How do you pull up a query which was previously saved in qmf?

678


What is meant by dclgen?

619


Is ibm db2 free?

578


Where do you specify them?

681


What is the picture clause of null indicator variable?

694


What is the difference between db2 and oracle?

683


What are the bind parameters ibm db2?

624