Nonstop Database, HiRDB Version 9 UAP Development Guide

[Contents][Index][Back][Next]

2.5.3 Deleting all rows in a table

When the target of data deletion is a base table, it is possible with the PURGE TABLE statement to delete all rows in the table in one step. Deleting all rows in a table in one step is more efficient than deleting them by using the DELETE statement with the WHERE clause omitted (without specifying a condition).

The PURGE TABLE statement cannot be executed if the application program is compliant with X/Open in the On-Line Transaction Processing (OLTP) environment.

The following figure shows, as an example of deleting all rows in a table, the procedure for deleting all data from the stock table.

Figure 2-19 Example of deleting all rows in a table

[Figure]