O'Reilly logo

Access 2007 Programming by Example with VBA, XML, and ASP by Julitta Korol

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 21Defining 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 Definition 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 idxSupplierName based on the SupplierName field.

Hands-On 21-1: Creating a Table with a Single-Field ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required