Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


Share this Page URL
Help

Part III: Programming with the Jet Data ... > Defining Indexes and Primary Keys - Pg. 424

C ha p t er 2 1 Defining Indexes and Primary Keys Indexes speed the processes of finding and sorting records. You should create indexes for fields that are frequently used in searches and in sorting. You can create an index on a new or existing table. An index can be made of one or more fields. This chapter presents a number of procedures that use Data Defi- nition Language statements to define indexes and primary keys. Creating Tables with Indexes You can create an index while creating a table by using the CONSTRAINT clause with the CREATE TABLE statement. The procedure in Hands-On 21-1 creates a new table called Supplier1 with a unique index called idxSupplier-