改变字段长度: ALTER table schema.table_name ALTER column_name set data type VARCHAR(10); call sysproc.admin_cmd('reorg table schema.table_name '); call sysproc.admin_cmd('runstats on table schema.table_name with distribution and indexes all'); 增加字段: ALTER TABLE schema.table_name ADD COLUMN column_name VARCHAR(100) NOT NULL WITH DEFAULT '*'; call sysproc.admin_cmd('reorg table schema.table_name '); call sysproc.admin_cmd('runstats on table schema.table_name with distribution and indexes all'); 加注释: COMMENT ON COLUMN table_name.column_name IS '注释';
删除字段:
ALTER TABLE schema.table_name
DROP COLUMN column_name