Specifying a key (key_spec) 

A key specification ( key_spec ) allows rows in a table to be located whose key column values match the values in the key specification. A row with the specified key values does not have to exist.

Syntax

<key_spec> ::= <column_name> = <value_spec>

column_name, value_spec

Explanation

The value specification ( value_spec ) must not be NULL.

The column name must identify a key column in the table.

The key specification must contain all the key columns in a table. The individual key specifications ( key_spec ) must be separated by commas.

For tables defined without key columns, there is the implicitly generated column SYSKEY CHAR(8) BYTE which contains a key generated by the database system. This column can only be used in a key specification.