March 2012
Intermediate to advanced
442 pages
9h 31m
English
In the earlier version of DB2, in order to empty the tables, we used the DELETE statement. The DELETE statement logs everything, so it's not efficient when we are dealing with a large volume of data. An alternate solution is to load the table using a null file and replacing the table data with it. In DB2 9.7, the TRUNCATE command is introduced, which deletes the data from a table quickly and does not log the activity, resulting in very good performance.
We need one of the following privileges to execute the TRUNCATE command:
DELETE privilegeCONTROL privilegeDATAACCESS authority
TRUNCATE is just a simple command that can also be embedded in any host language.
DROP ...Read now
Unlock full access