Deleting data from the DB2® database

Before you reload the database with new data, you should archive the SMF flat files for future reference, and then delete the old data. Deleting the data can be done in several ways:
  1. Use the DROP TABLE statement for each table you want to delete.
  2. Use the DROP TABLESPACE statement for each table space.
  3. Delete all of the records in each table.

    Figure 1 shows the sample SQL statements that delete the group record data from the tables.

Figure 1. DB2 Utility Statements Required to Delete the Group Records
           DELETE FROM userid.JOBINIT;
           DELETE FROM userid.ACCESS;
           DELETE FROM userid.ADDVOL;
           DELETE FROM userid.RENAMEDS;
           DELETE FROM userid.DELRES;