1.0

Table Of Contents
SET ASYNCEVENTLISTENER ( [listener-name] [, listener-name] * )
}
Description
See also ALTER TABLE Limitations on page 653.
See also GENERATED ALWAYS and GENERATED BY DEFAULT Identity Columns on page 451.
Adding columns and table-level constraints follows the same syntax as the CREATE TABLE on page 449
statement.
When you add columns with the ADD COLUMN clause, you can also place a column constraint on the new
column, as shown above. However, you can add a column with a NOT NULL constraint to an existing table
only if a default value is provided; otherwise an exception is thrown.
When you add constraints or a primary key, the existing table data is veried to satisfy the constraint. If the
existing data violates the constraint, the alteration fails and a constraint violation exception is thrown.
You cannot drop a primary key column, or any column that is used for table partitioning.
Dropping a column from the table can throw a constraint violation if related object data has become invalid.
This behavior applies to the RESTRICT clause, which is used by default. CASCADE deletes are not supported.
The schema objects which can cause a DROP COLUMN RESTRICT to be rejected include views, triggers,
primary key constraints, foreign key constraints, unique key constraints, check constraints, and column privileges.
You cannot drop the last remaining column in a table. Currently DROP COLUMN is not allowed if
sqlre.sql-authorization is true. When a column is dropped, it is removed from any indexes that contain it, and
the indexes are rebuilt if required. If that column was the only column in the index, then the entire index is
dropped.
The DROP CONSTRAINT clause above drops a constraint on an existing table. To drop an unnamed constraint,
specify the generated constraint name stored in SYS.SYSCONSTRAINTS as a delimited identier. Dropping
a primary key, unique, or foreign key constraint drops the physical index that enforces the constraint.
The ALTER COLUMN clause is a special form of the ALTER TABLE command that is executed on a table
that already contains data. Use the ALTER COLUMN clause after importing existing identity column values
(in a non-identity column) to change the column to a GENERATED ALWAYS AS IDENTITY column.
(GENERATED ALWAYS identity columns do not allow manual insertion of identity values.) After executing
this ALTER TABLE statement, SQLFire automatically generates identity values for new rows, and ensures that
new identity values are greater than the last imported value at the time you executed the ALTER TABLE
command. See sqlf write-schema-to-db and sqlf write-data-to-db for more information. See also Auto-Generated
Columns on page 653.
The SET EVICTION MAXSIZE clause enables you to change the eviction LRUMEMSIZE setting for the table.
See EVICTION BY Clause on page 462.
The SET GATEWAYSENDER and SET ASYNCEVENTLISTNER clauses enable you to change or remove
the gateway senders and asynceventlisteners associated with a table. The new list of senders or listeners that you
specify in each clause replaces the current conguration. Do not specify a name to remove all gateway sender
or AsyncEventListener congurations from a table, as shown in the examples below.
Example
- create a table with no constraints
CREATE TABLE trade.customers (
cid int not null,
cust_name varchar(100),
addr varchar(100),
tid int);
433
SQL Language Reference