您的位置:首页 > 数据库 > MySQL

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

2017-06-28 09:29 288 查看
举个栗子: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 的位置
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: