Q

Difference between candidate key and composite key

What is the difference between candidate key and composite key?

What is the difference between candidate key and composite key?

We've been getting a number of this type of question lately: short, and simple on the surface. Short questions

are wonderful, because they leave more room for the answer. Simple questions are even better, as long as they aren't too simple.

In this case, it's a good question but it might have been too simple.

A candidate key is any key that could be used as the primary key. This comes with two requirements: it cannot be null, and its values must be unique.

A composite key contains more than one column.

This was first published in April 2007

Dig deeper on Oracle and SQL

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

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.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close