8.0版本之上
-- 修改旧字段名为新字段名 ALTER TABLE bd_material_circuit_breaker RENAME COLUMN release_type TO release_type_zh; ALTER TABLE bd_material_circuit_breaker RENAME COLUMN control_type TO control_type_zh; ALTER TABLE bd_material_circuit_breaker RENAME COLUMN installation_method TO installation_method_zh; -- 新增英文字段 ALTER TABLE bd_material_circuit_breaker ADD COLUMN release_type_en VARCHAR(255) COMMENT '脱扣器类型en'; ALTER TABLE bd_material_circuit_breaker ADD COLUMN control_type_en VARCHAR(255) COMMENT '控制类型en'; ALTER TABLE bd_material_circuit_breaker ADD COLUMN installation_method_en VARCHAR(255) COMMENT '安装方式en';
5.7版本
ALTER TABLE bd_material_circuit_breaker CHANGE COLUMN release_type release_type_zh VARCHAR(255) COMMENT '脱扣器类型zh'; ALTER TABLE bd_material_circuit_breaker CHANGE COLUMN control_type control_type_zh VARCHAR(255) COMMENT '控制类型zh'; ALTER TABLE bd_material_circuit_breaker CHANGE COLUMN installation_method installation_method_zh VARCHAR(255) COMMENT '安装方式zh'; ALTER TABLE bd_material_circuit_breaker ADD COLUMN release_type_en VARCHAR(255) COMMENT '脱扣器类型en'; ALTER TABLE bd_material_circuit_breaker ADD COLUMN control_type_en VARCHAR(255) COMMENT '控制类型en'; ALTER TABLE bd_material_circuit_breaker ADD COLUMN installation_method_en VARCHAR(255) COMMENT '安装方式en';
标签:bd,en,COLUMN,数据库,修改,mysql,TABLE,type,ALTER From: https://www.cnblogs.com/ZkbFighting/p/18519594