Adding and Copying Database Columns

In addition to adding columns while creating a new table, you can add columns to an existing table in the database using Add column.

To add columns to an existing table:

  1. Select Add column in the pop-up menu for the table node or for an existing column in the table.
    Forte for Java opens a dialog for you to enter values for the column.
  2. Enter the Name of the column. This is the name used by SQL.
  3. Select constraints you want for column values (Primary key, and Unique or Null).
    If you select the Primary key checkbox, the column is included in the primary key, and
    you need to choose an index.
  4. If you want to use an index, check the Index checkbox and select an index from the drop-down list.
  5. You can optionally use the Checkcheckbox to enter constraints to be checked
    while inserting or updating data in that column.

To copy columns to an existing table:

  1. Mark the column(s) you want to copy.
  2. Select Copy from the pop-up menu for these column(s).
  3. Choose the table into which you want to copy the column(s).
  4. Select Paste from the pop-up menu for this table.
Note The ability to add or copy columns depends on the database you use:
if your database system allows you to alter tables containing data,
you can use it on non-empty tables,
but some systems might require the table to be empty.
See also
Creating Tables

Legal Notices