Creating Indexes with Restrictions

You can use the CREATE INDEX statement to add an index to an existing table. The CREATE INDEX statement can be used with the following options: PRIMARY option — Creates a primary key index that does not allow duplicate values in the key.

DISALLOW NULL option — Creates an index that does not allow adding records with Null values in the indexed field.

IGNORE NULL option — Creates and index that does not include records with Null values in the key.

Use the WITH keyword to declare the above index options.

Defining Indexes and Primary Keys | 429 Programming with the Jet Data Definition Language

The procedure in Hands-On 21-5 designates the SupplierId field as the primary key by using the PRIMARY option.

0 0

Post a comment