What is the difference between primary key & unique index ?

Answer Posted / mani

Primary key can be defined only one for a table whereas
number of unique indexes can be defined for a table.

primary key can not have null values but unique can have
null values and to remind one null value can never be equal
to another null value.

Is This Answer Correct ?    23 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the function of data manager.

632


Which isolation level provides highest data integrity?

599


What is the use of runstats in db2?

578


Explain in brief how does db2 determine what lock-size to use?

598


in my project..TEST is db2 8.1 version In PROD it is 7.1 if i do REORG in TEST.. can I use the same REORG jcl with out modification in PROD region (this is DB2 8.1 )? if not, what modification i need to do in my REORG control card?

1628






Explain dclgen.

725


How would the varchar column remarks defined?

639


What is a collection in db2?

584


What is the difference between db2 and oracle?

680


What is role in db2?

621


What is plan in cobol db2?

595


How do you concatenate the firstname and lastname from emp table to give a complete name?

603


My sql statement select avg(salary) from emp yields inaccurate results. Why?

643


What is difference between alias and synonym in db2?

645


List out the data types available.

704