Changing existing columns when altering a table

Use the Change Columns window to change the comment for existing columns in your table or change the length of an existing VARCHAR column. You can also change the formula that DB2 uses to determine values for a generated column.

Fields and controls

Authorities and privileges



To change the comment for an existing column:

  1. In the Comment field, type a new comment for the column or edit the existing comment.
  2. Optional: If you selected a VARCHAR column, you can change the column length. In the Length field, type a new length for the column.

    Attention: The new column length must be greater than the current column length.

  3. Optional: If you selected a generated column, and the values for that column are generated by a formula, you can use the field associated with the Formula radio button to change the formula that DB2 uses.
  4. Click on OK to make the change you specified for the column comment and close the Change Column window.
  5. If you do not want to make any additional changes to the table, click on OK to alter your table and close the Alter Table notebook. Otherwise, continue on to one or more of the optional tasks.


Related information