DB2-alter append/delete/Reset column operation finishing 1. add field alter table name add field name type Demo: 1 alter table table_name add column_test VARCHAR (50); 2. change Field type alter table name alter column field name set data type Demo: 1 alter table table_name alter column column_test set data type VARCHAR (3); note: there are operation restrictions on changing the field type. you can change the field to a value greater than the previous type length. to change it to a smaller value, you must drop the original column and add it again. for example, if I want to change the column of A Varchar (50) to Varchar (30), the above SQL statement cannot be used successfully. in addition, to change to different types, you also need to drop column first. 3. remove the field alter table Name drop column field name Demo: 1 alter table table_name drop column column_test; Note: After dropping the field, the table query/insert operation may fail, you need to execute the reorg command. reorg table table_name; 4. add default value for field alter table name alter column field name set default value Demo: 1 alter table table_name alter column column_test set default 'value'; 5. add the field Demo with the default value: 1 alter table table_name add column column_test vachar (20) not null with default 'value'; 6. set the default field time to the current time Demo: 1 alter table table_name alter column column_test set default current date;