MySQL 创建带注释的表
in SQL with 0 comment, Views is 60

MySQL 创建带注释的表

in SQL with 0 comment, Views is 60

创建带解释的表

CREATE TABLE groups(

  gid INT PRIMARY KEY AUTO_INCREMENT COMMENT '设置主键自增',
  
  gname VARCHAR(200) COMMENT '列注释'
  
  ) COMMENT = '表注释';

修改现有列,并加上解释

ALTER TABLE TABLE_NAME MODIFY COLUMN CILUMN_NAME INT COMMENT '列注释';

修改现有表,并加上解释

ALTER TABLE TABLE_NAME COMMENT = '表注释'; 

查看整个表的结构

SHOW CREATE TABLE TABLE_NAME;
Responses
选择表情