Home > Database > Mysql Tutorial > body text

How to modify comments in mysql

青灯夜游
Release: 2021-12-31 16:50:39
Original
13525 people have browsed it

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.

How to modify comments in mysql

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='表的注释';
Copy after login

Check it out

Modify table comments

alter table 表名 comment '修改后的表的注释';
Copy after login

##Modify field comments

alter table 表名 modify column 字段名称 字段类型 comment '修改后的字段注释';
Copy after login

## [Related recommendations:

mysql video tutorial

]

The 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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!