mysql更新注释的方法:执行【alter table `student` comment `注释内容`;】语句即可。完成之后,可以通过执行【show create table `table_name`;】语句查看注释是否更新成功。
首先创建一张学生表,代码如下:
(推荐教程:mysql教程)
create table `student` (`id` int(11) auto_increment primary key comment '学好',`name` varchar(32) not null default '' comment '姓名',`sex` tinyint(1) not null comment '性别',`age` tinyint(4) not null comment '年龄',`class` varchar(32) not null default '' comment '班级')engine=innodb charset=utf8 comment='学生表';
然后执行如下语句更新注释
alter table `student` comment '学生表2.0';
完成之后,执行如下语句查看表注释
show create table `student`
相关推荐:php培训
以上就是mysql如何更新注释的详细内容。