How to alter column from NULL to NOT NULL and vice versa?
Currently this is not possible to do via ALTER TABLE … ALTER COLUMN statement. You have two options: 1. add a new column, populate it, drop the old column and rename the new column to old name. For example if you have a table T1 with column C1, data type integer, it would go like this: ALTER TABLE T1 add C1_TEMP integer NOT NULL; COMMIT; UPDATE T1 set C1_TEMP = C1; COMMIT; ALTER TABLE T1 drop C1; ALTER TABLE T1 alter C1_TEMP to C1; If your column has a lot of dependencies, you can drop them, make the change and then recreate them. FlameRobin has ‘Generate Rebuild Script’ option at table’s properties page, which builds the script for you. 2. If is also possible with a simple system-tables change. While toying with system tables is usually not a good idea, changing the NULL option for a column is a common task, and this has been tested by many users for many years – as all admin tools do it that way: UPDATE RDB$RELATION_FIELDS SET RDB$NULL_FLAG = 1 WHERE RDB$FIELD_NAME = ‘C1’ AND RDB$R