SQL/MX 3.2.1 Reference Manual (H06.26+, J06.15+)

SQL/MX Statements
HP NonStop SQL/MX Release 3.2.1 Reference Manual691117-005
2-306
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 a table that has 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 object such as a view or an SQL/MP alias.
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] ...)