SQL/MX 2.x Reference Manual (H06.04+)

SQL/MX Utilities
HP NonStop SQL/MX Reference Manual—540440-003
5-5
Syntax Description of DUP
Syntax Description of DUP
source-target-list
specifies the source-table and target-table names.
source-table
specifies the fully qualified name for the table to be copied. The form of the
name is catalog-name.schema-name.table-name, where each part is an
SQL identifier. If you do not specify the catalog and schema parts of the
source-table, DUP uses the default catalog and schema values for that
session.
target-table
specifies the name of the target table. An asterisk (*) in the catalog or schema
part of the target object name indicates copying the corresponding position of
the source object name. If you do not specify a catalog and schema, DUP uses
the corresponding catalog and schema of the source table, similar to the
asterisk (*) option.
The name of the target object must be different from the fully qualified name of
the source object.
An error is returned if the source catalog, source schema, source object, target
catalog, or target schema does not exist or if the target table is the same as the
source table. DUP does not support duplication of views.
mapping
specifies which volumes DUP uses for the target partitions of tables and their
dependent indexes. If you do not specify the mapping option, target partitions are
mapped to the same volumes as the primary partition’s counterpart.
dup-option
specifies the different DUP options available for the operation, including:
TARGET {NEW | PURGE}
TARGET is an optional clause that specifies the action if the target-table
already exists. NEW specifies that a new target table be created. If the target
table already exists, an error is returned. PURGE specifies that the target table,
if it exists, should be dropped and a new target table created. If the target table
does not exist, a new target table is created. The default is NEW.
Caution. If you choose the PURGE option, DUP first drops the target table. If an error occurs
further along in the DUP operation, you cannot recover the original target table. You should
back up the target table before you begin your DUP operation.