IBM Books

SQL Reference


Keys

A key is a set of columns that can be used to identify or access a particular row or rows. The key is identified in the description of a table, index, or referential constraint. The same column can be part of more than one key.

There are Unique Keys, Primary Keys, Foreign Keys and Partitioning Keys.

A key composed of more than one column is called a composite key. In a table with a composite key, the ordering of the columns within the composite key is not constrained by their ordering within the table. The term value when used with respect to a composite key denotes a composite value. Thus, a rule such as "the value of the foreign key must be equal to the value of the primary key" means that each component of the value of the foreign key must be equal to the corresponding component of the value of the primary key.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]