Use the ALTER TABLE command to change the characteristics of an existing table and its columns. You can add, drop, and alter columns, and manually set the value of fields of type INCR.
ALTER TABLE [database_name.]table_name
SET INCR value
ADD [COLUMN] column_name data_type [ NODEFAULT | NOMODIFY | HIDDEN ]
DROP [COLUMN] column_name
ALTER [COLUMN] column_name SET NOMODIFY { TRUE | FALSE }
ALTER [COLUMN] column_name SET HIDDEN { TRUE | FALSE }
ALTER [COLUMN] column_name SET NODEFAULT { TRUE | FALSE }
ALTER [COLUMN] column_name SET WIDTH value;
You can specify more than one ADD, DROP, or ALTER setting in a single ALTER TABLE command.
alter table mytab add col3 real;
A column of type INCR is used to give each row in a table a unique number, such as the Serial column in the alerts.status table. On each insert, the current increment value is copied to the new row and is then increased for the next row. You can use the SET INCR (set increment) clause to set the increment value for subsequent rows. This is useful, for example, when you want to change the Serial value that is assigned to new alerts in the alerts.status table.
ALTER TABLE table_name SET INCR value
Where table_name is
the name of a table that contains a column of type INCR and value is
an integer.1> alter table alerts.status set incr 20100
2> go