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

SQL/MX Utilities
HP NonStop SQL/MX Reference Manual540440-003
5-76
PURGEDATA Utility
PURGEDATA Utility
Considerations for PURGEDATA
Examples of PURGEDATA
PURGEDATA is a syntax-based utility that can be executed through MXCI. The
PURGEDATA utility deletes all data from an SQL/MX table and its related indexes or
from specified partitions of tables that have no indexes.
Syntax Description of PURGEDATA
table-name
is the name of the table from which the data is to be deleted. You can specify
delimited and regular identifiers. If you do not specify the catalog and schema parts
of the table-name, the default catalog and schema values for that session are
applied. PURGEDATA returns errors if the catalog name does not exist, if the
schema name is invalid, if the table name does not exist, or if the object name
specifies an invalid table such as views and SQL/MP aliases.
list-of-partitions
is the optional clause that specifies a subset of partitions to purge. If you do not
specify this clause, PURGEDATA purges data from all partitions and dependent
indexes. If you specify this clause, PURGEDATA purges data from the partitions in
PURGEDATA table-name [list-of-partitions] [IGNORE_TRIGGER]
table-name is:
[ [catalog.]schema.]name
list-of-partitions is:
[PARTITION] WHERE partition-map
partition-map is:
{guardian-name | first-key }
guardian-name is:
LOCATION [\node].$volume[.subvolume.file]
first-key is:
{[KEY=] partition-id
|[KEY=] partition-id UPTO [KEY=] partition-id
|[KEY=] partition-id THRU [KEY=] partition-id }
partition-id is:
{{FIRST | LAST} PARTITION
| key-value }
key-value is:
VALUE (column-value [, column-value] ...)