1、 建立表的時候寫注釋
2、修改表的注釋create table 表名
( 欄位名 int comment '欄位的注釋'
)comment='表的注釋';
alter table 表名 comment '修改後的表的注釋';
3、修改欄位的注釋
alter table 表名 modify column 欄位名 字段型別 comment '修改後的字段注釋';
4、 檢視表注釋的方法
–在生成的sql語句中看
show create table 表名;
–在元資料的表裡面看
5、檢視字段注釋的方法use information_schema;
select * from tables where table_schema='資料庫名' and table_name='表名'
–show
show full columns from 表名;
–在元資料的表裡面看
select * from columns where table_schema='資料庫名' and table_name='表名'
mysql 修改表注釋 字段注釋 檢視與修改注釋
2018年5月23日 1 建立表的時候寫注釋 create table test1 field name int comment 欄位的注釋 comment 表的注釋 2 修改表的注釋 alter table test1 comment 修改後的表的注釋 3 修改欄位的注釋 alter table ...
mysql新增表注釋 字段注釋 檢視與修改注釋
1 建立表的時候寫注釋 create table test1 field name int comment 欄位的注釋 comment 表的注釋 2 修改表的注釋 alter table test1 comment 修改後的表的注釋 3 修改欄位的注釋 alter table test1 modif...
mysql新增表注釋 字段注釋 檢視與修改注釋
1 建立表的時候寫注釋 create table test1 field name int comment 欄位的注釋 comment 表的注釋 2 修改表的注釋 alter table test1 comment 修改後的表的注釋 3 修改欄位的注釋 alter table test1 modif...