Postgres Plus Advanced Server Oracle Compatibility Developer's Guide : 12.4 ALTER TABLE...DROP PARTITION

Previous PageTable Of ContentsNext Page

Postgres Plus Advanced Server Oracle Compatibility Developer's Guide

 

12.4 ALTER TABLE...DROP PARTITION

Use the ALTER TABLEDROP PARTITION command to delete a partition and the data stored in that partition. The syntax is:

      ALTER TABLE table_name DROP PARTITION partition_name;

Description

The ALTER TABLE… DROP PARTITION deletes a partition and the data contained within that partition.

To use the DROP PARTITION clause, you must be the table owner, a member of a group that owns the table with DROP TABLE privileges, or have superuser or administrative privileges.

Parameters

table_name

The name (optionally schema-qualified) of the modified table.

partition_name

The name of the partition to be deleted.

Example

The following example deletes the partition, sales from the employees table:

      ALTER TABLE employees DROP PARTITION sales;

Previous PageTable Of ContentsNext Page