ALLBASE/SQL Reference Manual (36216-90216)

338 Chapter10
SQL Statements A - D
CREATE PARTITION
for a DBEnvironment. However, the partition information is only used in audit log
records. Thus, partition information will not be utilized in logging until the
DBEnvironment has audit logging enabled.
Data partition information (including the default partition) appears in the system view
SYSTEM.PARTITION. If the default partition is set to NONE, or is never defined, no
row appears in SYSTEM.PARTITION for it.
The DROP PARTITION and CREATE PARTITION statements are used to change the
partition number assigned to a partition other than the default partition. The START
DBE NEWLOG statement is used to change the partition number of the default partition.
The partition number, not the partition name, is used in audit logging. A partition name
is used in the CREATE TABLE and ALTER TABLE statements to associate a table with a
partition.
Authorization
You must have DBA authority to use this statement.
Example
To create a partition containing tables, first create the partition.
CREATE PARTITION PartsPart WITH ID = 10;
Then assign tables(s) to the partition.
ALTER TABLE PurchDB.Parts SET PARTITION PartsPart;
To drop a partition, first assign all tables in the partition to the NONE partition.
ALTER TABLE PurchDB.Parts SET PARTITION NONE;
Then drop the partition.
DROP PARTITION PartsPart;