Type the name for the column that you are adding in this field. This name can contain up to 30 characters and be an ordinary or delimited identifier.
Attention: You cannot use the same name for more than one column of the table.
Specifies the data type of the column that you are adding. To specify the data type, click the down arrow to display a list of data types and select one.
Specifies the length of the columns based on the specified data type.
This field is available only if you specified CHARACTER, VARCHAR, BLOB, CLOB, DBCLOB, GRAPHIC, or VARGRAPHIC in the Data type box.
Specifies a multiplier for the length of columns of data type BLOB, CLOB, or DBCLOB.
This box is available only if you specified BLOB, CLOB, or DBCLOB in the Data type box.
Specifies the precision of a DECIMAL number. The precision is the total number of digits, which can range from 1 to 31. If you do not specify the precision, a default value of 5 is used.
This field is available only if you specified DECIMAL in the Data type box.
Specifies the scale of a DECIMAL number. The scale is the number of digits to the right of the decimal point, which can range from 0 to the precision of the number. If you do not specify the scale, a default value of 0 is used.
This field is available only if you specified DECIMAL in the Data type box.
Specifies that the column contents are not generated by the DB2 engine
Specifies that changes made to the column are written to the log. The data is then recoverable with database utilities, such as RESTORE DATABASE.
Note: LOBs greater than 1 GB cannot be logged, and LOBs greater than 10 MB should not be logged for performance reasons.
The implication of not logging is that during a roll-forward operation, after a backup or load operation, the LOB values that would have had log records replayed during the roll-forward are replaced by zeroes. During crash recovery, all committed changes and changes rolled back will reflect the expected results.
Specifies that the values in the LOB column should take up minimal disk space. Only available if you specified a data type of BLOB, CLOB, DBCLOB, or a distinct type with any of these as source types in the Data type box.
Note: Storing data in this way can cause a performance penalty in any append (length-increasing) operations on the column.
Specifies the contents of the column to be treated as bit (binary) data. During data exchange with other systems, code page conversions are not performed. Comparisons are done in binary, irrespective of the database collating sequence.
This check box is available only if you specified a data type of CHARACTER, VARCHAR, or LONG VARCHAR in the Data type box.
Specifies that you want to use a default value for a column. The Default entry field shows the value.
Optional: Specifies a default value for the column. Select the radio button, then type the constant value, CURRENT DATE, CURRENT TIME, CURRENT TIMESTAMP, USER, or NULL in this field. Ensure that the expression is valid for the Datatype characteristics that you specified.
The default value you type will be used exactly as entered, so you must make sure that the value is properly delimited. For example, default literals for a CHAR or VARCHAR column should be delimited with single quotes.
Optional: Select to have minimal disk space usage if the inserted/updated value is equal to the system default value for the data type of the column. This option works for all numerical type columns and fixed-length character/graphic strings. When selected, value compression is automatically selected for the entire table.
Shows if DB2 automatically generates the contents of the column. DB2 uses a formula when it generates the values for the generated column. The contents are dynamically updated if any dependencies change.
Displays the formula used when generating the values for the generated column.
Allows the generated column to be an identity column. DB2 generates a unique numeric value for each row in the table. An identity column must conform to the following rules:
Specifies the first value in the identity column.
Shows the incremental number that you want DB2 to use when it generates a number for each row.
Specifies the number of identity column values that you want to be cached. This allows DB2 to cache identity column values to obtain better performance for applications.
Select to enter a formula for DB2 to use when it generates the values for the generated column. This enables the Formula entry field where you can enter the formula.
This control is enabled when you select Generate column contents.
Allows the column to contain null values. The default value for the column is either the null value or, if the Default radio button is checked, the value specified in the Default field.
Attention: If the column will be a primary key column, it cannot be nullable.
Specifies whether the constraint is enforced by the database manager during normal operations such as insert, update, or delete.
Optional: Type a comment to document the column that you are adding. You can type up to 254 characters, including embedded blanks.
Closes the Add Column window and return to the Columns page of the Alter Table notebook. Any changes that you made that you did not add are not saved. You can add multiple columns before clicking Cancel.
Adds the new column that you just defined. You can add multiple columns before closing the Add Column window.
You can add up to 500 columns to your table. The sum of the byte counts of the columns must not be greater than 4005.
Allows DB2 to automatically generate the contents of the column.
Displays the name currently specified for the column that you are altering. You cannot alter this field for an existing column. To specify a different name for a column that you are adding, type the new name for the column in this field. This name can contain up to 30 characters and can be an ordinary or delimited identifier.
Attention: You cannot use the same name for more than one column of the table.