mysql在指定的一个字段后面添加一个字段

来源:互联网 发布:男性保健药品 知乎 编辑:程序博客网 时间:2024/05/14 21:58
举个栗子:alter table inquiry add error_code varchar(3) after add_time;
说明:alter table + 表名 + add + 要添加的字段 字段类型 +  after  + 要跟随的字段名

alter table t_adviser_info add hold int COMMENT '0持有,1未持有' after stockname
alter table t_adviser_info add profit int comment "0盈利,1亏损" after hold
alter table t_adviser_info add weight int comment "0轻仓,1重仓" after profit
注意 Int,comment,和after 的位置
原创粉丝点击