mysql建表怎么添加注释

在mysql中,可以使用“create table”语句和comment关键字来在建表时添加注释,语法“create table 表名 (字段名 字段类型 comment 字段的注释)comment=表注释;”。 本教程操作环境:windows7系统、

在mysql中,可以使用“create table”语句和comment关键字来在建表时添加注释,语法“create table 表名 (字段名 字段类型 comment '字段的注释')comment='表注释';”。

本教程操作环境:windows7系统、mysql8版本、Dell G3电脑。

在MySQL数据库中, 表或字段(列)的注释是用属性comment来添加。

创建新表的脚本中, 可在字段定义脚本中添加comment属性来添加注释。

MySQL建表语句+添加注释

1、建表+注释

语法: