Composite key

From Oracle FAQ
Jump to: navigation, search

A composite key is a primary key that consists of more than one column. Oracle will create a composite primary key index on the table to implement and enforce the composite key. Composite keys are also known as concatenated or aggregate keys.


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[edit]

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 #