SQL/MX 2.x Reference Manual (H06.10+, J06.03+)
SQL/MX Utilities
HP NonStop SQL/MX Reference Manual—544517-008
5-12
FASTCOPY INDEX Command
index-clause
specifies how FASTCOPY TABLE will treat indexes. The index-clause has
these values:
The default is INDEXES IMPLICIT.
FASTCOPY INDEX Command
The FASTCOPY INDEX command copies all rows from one table to the existing
equivalent table. It requires select privileges on the source table, and insert, update,
and delete privileges on the target table.
source-index
is the ANSI name of the index that is being copied from.
target-index
is the ANSI name of the index that is being copied into. The target index must exist
prior to the operation.
Considerations for FASTCOPY
•
The FASTCOPY TABLE command copies column values by the column order—the
first source table column is copied to the first target table column, the second
source table column is copied to the second target table column, and so forth.
•
The FASTCOPY command preserves the SYSKEY column values from the source
table. The copy-by-column-order strategy applies to SYSKEY columns as well.
•
As part of initialization, the FASTCOPY TABLE command removes the existing
rows from the target table and all its indexes.
•
If the fastcopy operation is incomplete because of any reason, use the RECOVER
utility before reattempting a FASTCOPY command on the same table.
EXPLICIT Indexes on the target table will be explicitly copied. For each
matching pair of source and target indexes, the FASTCOPY
INDEX Command can be used to explicitly perform the copy
concurrently with the copy of the table, if required. Each
target index must have a matching source index.
IMPLICIT All indexes on the target table are maintained automatically
as a part of the FASTCOPY utility.
FASTCOPY INDEX source-index [TO] target-index










