Scalable Database Server, HiRDB Version 8 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.

Figure 2-19 shows an example of deleting all rows in the stock table.

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

[Figure]