alter table 表名 add 字段名 类型 DEFAULT 默认值 COMMENT '字段的备注';
例如:
alter table t_user_info add win_status char(1) DEFAULT 0 COMMENT '中奖状态 未中奖0,已中奖1';
运行结果:
默认值为0
alter table 表名 add 字段名 类型 DEFAULT 默认值 COMMENT '字段的备注';
例如:
alter table t_user_info add win_status char(1) DEFAULT 0 COMMENT '中奖状态 未中奖0,已中奖1';
运行结果:
默认值为0