如果表已经存在,用如下方法设置默认值。

alter table 表名 modify 字段名 default 默认值;

如test表中设置address字段为'浙江省',可用如下语句:

alter table test modify address default '浙江省';
posted on 2017-12-08 10:42  田坤坤  阅读(23999)  评论(0编辑  收藏  举报