The Alter Table dialog box lets you add, change, or delete a table's columns, as well as to add or change an existing table's indexes, primary keys, foreign keys, synonyms, and aliases.
If you are running against an XDB Server (local or multi-user), just about any part of a table specification can be altered, even if the table already contains data. You can rename the table or its columns, change column data types, change the ordering of the columns, and add or drop columns.
If you are running against DB2, there are limits on the changes you can make to a table because the DB2 ALTER TABLE statement is not as comprehensive as the XDB Server ALTER TABLE statement. When connected to DB2 via XDB Link, only those functions that are supported on DB2 (such as adding columns) are enabled on the Alter Table dialog box.
To alter a table:
From the Catalog Browser dialog box, click the
Table tab and choose a table; then click the
Alter button.
SQLWizard displays the Open dialog box.
If you wish to change the data type of an existing field, be sure that the new data type is compatible with the old data type. For example, you would not be allowed to change a date field to a decimal field. Other changes may be possible, but not desirable, such as changing an integer field to a character field.