Changing column properties
Use the ALTER TABLE statement to
change column properties, such as nullability, LOB options, scope,
constraints and compression attributes, data types, and so on.
For
complete details, see the ALTER TABLE statement.
Before you begin
To alter a table, you must have at least one of the following
privileges on the table to be altered:
- ALTER privilege
- CONTROL privilege
- DBADM authority
- ALTERIN privilege on the schema of the table
You must have DBADM authority to:
- Change the definition of an existing column.
- Edit and test SQL when changing table columns.
- Validate related objects when changing table columns.
Procedure
To change column properties:
Issue the ALTER TABLE statement.
For example,
from the command line, enter:
ALTER TABLE EMPLOYEE
ALTER COLUMN WORKDEPT
SET DEFAULT '123'