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

SQL/MX Statements
HP NonStop SQL/MX Reference Manual540440-003
2-87
Considerations for CREATE TABLE
WITH PARTITIONS
directs NonStop SQL/MX to use partition definitions from source-table.
Each new table partition resides on the same volume as its original source-
table counterpart. The new table partitions do not inherit partition names from
the original table. Instead, NonStop SQL/MX generates new names based on
the physical file location.
If you specify the LIKE clause and the PARTITION file-option, you cannot
specify WITH PARTITIONS. If you specify the LIKE clause and the STORE BY
store-option, you cannot specify WITH PARTITIONS. If the
source-table has a partitioned index for a constraint, an index is created for
the constraint on the target table, with attributes that differ from the attributes of
the source table’s index.
Considerations for CREATE TABLE
Reserved Table Names
Table names prefixed by the name of a UMD table are reserved. You cannot create
tables with such names. For example, you cannot create a table named
HISTOGRAMS_MYCOPY.
Partitions
If there is a possibility that you might need to partition a table in the future, you should
create it with at least one partition. This avoids recompilation if you add more partitions
later.
The LIKE specification
The CREATE TABLE LIKE statement does not create views, owner information, or
privileges for the new table based on the source table. Privileges associated with a
new table created by using the LIKE specification are defined as if the new table is
created explicitly by the current user.
If the source table has any unique or droppable primary key constraints, NonStop
SQL/MX creates indexes for them on the target table. Other indexes on the source
table are not created on the target table.
The LIKE specification ignores triggers.