FirebirdSQL logo

PRIMARY KEY

The PRIMARY KEY constraint is built on one or more key columns, where each column has the NOT NULL constraint specified.The values across the key columns in any row must be unique.A table can have only one primary key.

  • A single-column primary key can be defined as a column-level or a table-level constraint

  • A multi-column primary key must be specified as a table-level constraint

The UNIQUE Constraint

The UNIQUE constraint defines the requirement of content uniqueness for the values in a key throughout the table.A table can contain any number of unique key constraints.

As with the primary key, the unique constraint can be multi-column.If so, it must be specified as a table-level constraint.