Q
Evaluate Weigh the pros and cons of technologies, products and projects you are considering.

Primary key vs. unique key

What is the difference between a primary key and a unique key in DB2?

One difference is that a unique key constraint can be created over columns with null values, while a primary key constraint does not allow null values. The other difference is that there can only be one primary key constraint defined on a table, but there can be multiple unique key constraints defined on a table.

==================================
MORE INFORMATION ON THIS TOPIC
==================================

Search400.com's targeted search engine: Get relevant information on DB2/400.

The Best Web Links: tips, tutorials and more.

Check out this Search400.com Featured Topic: Database issues resolved


Dig Deeper on DB2 UDB (universal databases)

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close