SQLzoo.net

CREATE TABLE with a composite primary key

Access

A composite key has more than one attribute (field). In this example we store details of tracks on albums - we need to use three columns to get a unique key - each album may have more than one disk - each disk will have tracks numbered 1, 2, 3...

The primary key must be different for each row of the table. The primary key may not contain a null.

Execute tidy up code silently


Specific to Access
none

Related links:

  • CREATE, DROP and ALTER