Tuesday, April 9, 2013

I know how to truncate a table, but that was in Oracle. To do this in DB2, an immediate keyword is required at the end of the statement. Here is the sample > truncate table < Table_Name > immediate

But sometimes after the table has been truncate, the table becomes un-editable. I come across this issue by applying this command > db2 reorg < Table_Name > to the server, not the SQL editor. And it just work. More information on reorg can be found here.

No comments: