Composite key

From Oracle FAQ

Jump to: navigation, search

A composite key is a primary key that consists of more than one column. Also known as a concatenated key or aggregate key.

Example

For example, the LINE_ITEMS table may have a composite key on {orderID, itemNumber}:

CREATE TABLE line_items (
  orderID    NUMBER,
  itemNumber NUMBER,
  productId  NUMBER,
  quantity   NUMBER,
  PRIMARY KEY (orderID, itemNumber));

Also see


Glossary of Terms
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z #
Personal tools