Adding a Unique Index with SQL DDL

By using SQL DDL statements, you can specify a CONSTRAINT clause to add a unique index at the time the table is created:

CREATE TABLE Member_List
	(FirstName TEXT (10),
	LastName TEXT (20),
	DateOfBirth DATETIME,
	CONSTRAINT UniqueKey UNIQUE (FirstName, LastName, DateOfBirth));

This DDL statement creates a unique index based on the combination of the FirstName, LastName, and DateOfBirth fields. The combined values of all three fields in the index must be unique, even if two or more records have the same value in just one of the fields.