Skip to content

DISJOIN TABLE

DISJOIN TABLE#

Syntax#

disjoin_table ::=#

partition_to_table_clause ::=#

Prerequisites#

At lease one of the following conditions must be met in order to create a table:

  • The SYS user
  • The user have the CREATE TABLE or CREATE ANY TABLE system privilege in their own schema
  • The user have the CREATE ANY TABLE system privilege in another user's schema

At least one of the following conditions must be met:

  • The SYS user
  • The table's owner
  • The user has the DROP ANY TABLE system privilege.

Description#

Partitions in a partitioned table are converted into one or more tables. Partitioned tables are dropped and non-partitioned tables are created. The partitions are each converted to the specified table and the data is moved. If a table space option is not specified, a new table will be created in the default table space.

partition_to_table_clause#

This clause specifies the name of the table to be used after dismounting all partitions belonging to the partitioned table.

Considerations#

The following statements should be taken into consideration when using DISJOIN TABLE syntax.

  • Do not specify the owner name in the target table and the partitioned table that are created.
  • The metatable associated with the newly created non-partitioned table is created, and the metatable associated with the partitioned table is deleted.
  • PMS, packages, and views that are related to the target table cannot be used.
  • Hash partitioned tables are not supported.
  • The target partitioned table have the same condition with partition's attribute, constraints, and schema.

Example#

<Query> Convert each partition p1, p2, and p3 in table t1 into t2, t3, and t4, respectively.

iSQL> disjoin table t1
(
  partition p1 to table t2,
  partition p2 to table t3,
  partition p3 to table t4
);
Disjoin success.