Tuesday, June 8, 2010

DB2, delete data in a table

delete from table_name

or, if the table contains a large number of rows and you get an error of "full transaction log", you can run the truncate statement:

v8
alter table table_name activate not logged initially with empty table

from v9.1
truncate table table_name immediate
More information about this new statement on precius InfoCenter.

No comments:

Post a Comment