Question: In the DB2 database, do you need to do a reorg operation on the table to get the table state back to normal when the table's structure is modified?
A: There are 4 kinds of operations, you need to do reorg operation of the table
1. SET DATA TYPE Altered-data-type
However, the following two cases are exceptions and do not require reorg:
1). Increasing the length of a VARCHAR or vargraphic column
2). Decreasing the length of a VARCHAR or vargraphic column without truncating trailing blanks from existing Data
2. SET not NULL
3. DROP not NULL
4. DROP COLUMN
Other operations, theoretically do not need to reorg, but some operations, it is necessary to reorg after the actual effect, such as "ALTER TABLE ... COMPRESS YES ", the syntax does not need to reorg operation, also does not affect the table additions and deletions to the operation, but only after reorg, can really turn on compression:
After a table have been altered to enable row compression, all rows in the table can is compressed immediately by performin G One of the following actions:
1. REORG command
2. Online table Move
3. Data Unload and Reload
Go Several situations in DB2 that require reorg operation