alter table tablename alter column drop default; (若本身存在默认值,则先删除)
alter table tablename alter column set default 't5';(若本身不存在则可以直接设定)
eg:
alter table `t_member_base_ext` alter member_autograph drop default;
alter table `t_member_base_ext` alter member_autograph set default null;
- t_member_base_ext 表名
- member_autograph 表字段
转载于:https://www.cnblogs.com/Profound/p/9634031.html