发布于 3年前

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

举个栗子: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 的位置

alter table qishu_detail_sort01 ADD TXT_pid int(11) NOT NULL DEFAULT "1" after TXT_NewUrl;

©2020 edoou.com   京ICP备16001874号-3