Previous Topic: Adding a Default IndexNext Topic: Additional Columns in Foreign Key Indexes


ALTER TABLE Statement for Adding a Default Index

The ADD DEFAULT INDEX parameter has been added to the ALTER TABLE statement to enable adding a default index.

For more information about default indexes, see the section CREATE TABLE in the SQL Reference Guide.

ALTER TABLE Syntax for Adding a Default Index

The following diagram shows the syntax placement of the new parameter for the Default Index enhancement to the ALTER TABLE statement:

►►─ ALTER TABLE ─┬─────────────────┬─ table-identifier ────────────────────────►
                 └─ schema-name ─.─┘

 ►────┬─ . . . ───────────────────────────────────────────┬────────────────────►◄
      └─ ADD DEFAULT INDEX ───────────────────────────────┘

ALTER TABLE Parameters for Adding a Default Index

The following parameter describes the Default Index enhancement to the ALTER TABLE statement

ADD DEFAULT INDEX

Creates a default index for the named table.

The table must not already have a default index associated with it.

Example: Add a Default Index

The following statement adds a default index to the EMP.DEPT table:

alter table emp.dept 
      add default index;