Home >Database >Mysql Tutorial >How to modify comments in mysql
Modification method: 1. Use the "alter table table name comment 'comment content';" statement to modify the table's comments; 2. Use "alter table table name modify column field name type comment 'comment content' ;" statement can modify the comment of the field.
The operating environment of this tutorial: windows7 system, mysql8 version, Dell G3 computer.
Write a comment when creating the table and use the comment keyword
Syntax:
create table 表名 ( 字段名 类型 comment '字段的注释' )comment='表的注释';
Check it out
Modify table comments
alter table 表名 comment '修改后的表的注释';
##Modify field comments
alter table 表名 modify column 字段名称 字段类型 comment '修改后的字段注释';
## [Related recommendations:
mysql video tutorialThe above is the detailed content of How to modify comments in mysql. For more information, please follow other related articles on the PHP Chinese website!