SQL/MX 3.2.1 Reference Manual (H06.26+, J06.15+)

SQL/MX Statements
HP NonStop SQL/MX Release 3.2.1 Reference Manual691117-005
2-226
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 index to the existing
equivalent index.
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.
Fastcopy checks for RI constraints that reference the target table, and rejects the
operation if any such RI constraints exist and the target table is non-empty.
For a table with an IDENTITY column at the source, the target, or both, the
FASTCOPY utility copies the source base table data to the target base 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