温馨提示×

mysql怎么修改数据表的属性

九三
167
2021-02-12 16:08:10
栏目: 云计算
亿速云mysql数据库,读写分离,安全稳定,弹性扩容,低至0.3元/天!! 点击查看>>

mysql怎么修改数据表的属性

mysql中修改数据表属性的方法

1.将表中的myisam属性修改为utf8属性

alter table '表名' engine=myisam charset=utf8;

2.在表中添加一个GetewayId字段,类型为int,且不能为null

alter table 'test' Add column GatewayId int not null default 0

3.修改表中的birth字段,允许其为空

alter table expert_info change birth birth varchar(20) null;

亿速云「云数据库 MySQL」免部署即开即用,比自行安装部署数据库高出1倍以上的性能,双节点冗余防止单节点故障,数据自动定期备份随时恢复。点击查看>>

推荐阅读:mysql怎么修改数据表内容

0