Insert a column
You can insert columns into a new or existing table.
- In the System i Navigator window, expand the system you want to use.
- Expand Databases.
- Expand the database and schema that you want to work with.
- To add a column to a new table, right-click Tables and select New.
- To add a column to an existing table, click Tables, then right-click the table and select Definition.
- On the Table Definition dialog, select the Columns tab.
- Click Add.
- In the Column definition dialog, specify a name for the column.
- Specify a short column name in the Short column name field. If no name is selected, the system automatically generates a name.
- To select a type for the column, click the type currently listed, click the down arrow and select a type from the list
provided.
- Specify a length for the column. For data types where the size is predetermined, the size is filled in and you cannot
change the value.
- Specify a description for the column in the Text field. This step is optional.
- Specify a heading for the column. The heading is the name that will appear on top of the column when displaying or printing. You are limited to 60 characters, 20 per line.
- Select Nullable to allow the column to contain null values.
- Specify a default value.
- Click OK to close the Table definition dialog and to insert the new column.
Note: You can copy column definitions from other tables.