Mysql给表中每个字段加 注释 COMMENT '注释内容',例如flag int(10) not null default 0 COMMENT '0表示在线,1表示离线',这样就可知道表中这个字段的实际含义

我们创建的表中通常有些字段用来表示状态,时间长了,我们自己都不知道这个字段是什么含义。

 

为此我们有时候需要给该字段加注释,使用的是Mysql的COMMENT关键字。

 

方法:

 

create database db_bill_test;

 

create table t_bill_test

(

name varchar(20) not null default '',

flag int(10) not null default 0 COMMENT '0在线,1离线'

);

 

 

 

相关文章:

  • 2022-02-02
  • 2022-12-23
  • 2021-12-15
  • 2022-02-07
  • 2021-09-04
猜你喜欢
  • 2021-05-29
  • 2022-12-23
  • 2021-12-16
  • 2022-12-23
  • 2022-12-23
  • 2021-11-30
  • 2021-11-21
相关资源
相似解决方案