5 Database Administration

Call Data Tables

A SQL statement may have more than one key field, as in the following example:

SELECT * from “table_name” where “FIELD1” = ‘data1’ AND “FIELD2” = ‘data2’;

In this example, FIELD1 and FIELD2 are key fields. Create an index for each of these fields to enhance system performance.

Unique Indexes

Unique indexes on fields enforce uniqueness of the data in that field across the entire table of records. For example, a field for which you might create a unique index is one that contains a social security number (SSN). A unique index on an SSN field ensures that only one record with a given SSN can exist in the table. Attempts to add records with that SSN will fail.

Use the following procedure to create a unique index on a field called FIELD1 in a table called “table_name”:

1At the Console Login: prompt, enter root The system prompts you for a password.

2Enter your root password.

The system displays the system prompt #.

3Enter sqlplus sti/sti

The system starts a sqlplus session.

UCS 1000 R4.2 Administration 585-313-507

Issue 3 April 2000 211