SQL/MX 2.x Reference Manual (G06.24+, H06.03+)
SQL/MX Utilities
HP NonStop SQL/MX Reference Manual—523725-004
5-6
Syntax Description of DUP
INDEX[ES] [{ON [(index-list)] | OFF }]
is an optional clause that specifies how dependent indexes are copied.
INDEX[ES] is the same as INDEX[ES] ON. Unpopulated indexes are not
duplicated.
ON [(index-list)]
duplicates all user-created and system-generated indexes. If the source
and target tables reside in the same catalog and schema, you must specify
index-list to identify the new index names. The default is ON.
System generated indexes are copied only if the CONSTRAINTS option is
ON.
index-list
is a list of index-maps. This option duplicates only a subset of the
indexes available on the source table. If you specify this option, only
those indexes that are described in the index-list are duplicated. If
an index that exists on the source table does not have corresponding
item in the index-list, DUP does not duplicate the index.
index-map
You cannot define names for system-generated indexes. If you do not
specify index-map, names are generated for all indexes.
You can specify a mapping clause for each pair in index-list. If
you do not specify a mapping clause as part of index-map, the
mapping clause for the base table is used. If you do not specify a
mapping clause, the source partition volume is used for target
partitions. If you specify a nonexistent index name in the index map,
DUP returns an error.
Mapping can be at the table level or the index level. If you specify
mapping at the table level, DUP uses that mapping. If the index does
not have a corresponding volume mapping, DUP uses the same
volume as the source index to create the target index partitions.
OFF
does not duplicate indexes. Constraints that requires an index are not
duplicated, including unique constraints and non clustering primary key
constraints. Referential integrity constraints are never duplicated. If
CONSTRAINTS is also OFF, the DUP operation proceeds.
CONSTRAINT[S] [{[ON] (constraint-list) | OFF | ON}]
is an optional clause that specifies whether to copy DROPPABLE constraints
not null, primary key, and check. If you do not specify this clause, the default is
CONSTRAINTS ON. UNIQUE constraints are treated as DROPPABLE