mysql对一个表 修改删除新增某列

 删除某几列


alter table data drop column coupon_start_time,drop column coupon_end_time

插入某几列

alter table `coupon_template` 
	add coupon_start_time   datetime not null  default '0000-00-00 00:00:00' comment '活动开始时间 固态有效日期',
	add coupon_end_time     datetime not null  default '0000-00-00 00:00:00' comment '活动结束时间 固态有效日期'

修改某几列

alter table `coupon_template` 
	add coupon_start_time modify  datetime not null  default '0000-00-00 00:00:00' comment '活动开始时间 固态有效日期',
	add coupon_end_time   modify  datetime not null  default '0000-00-00 00:00:00' comment '活动结束时间 固态有效日期'

猜你喜欢

转载自blog.csdn.net/qq_36999656/article/details/81631133