当前第2页 返回上一页
1 | show full columns from test;
|
创建表的时候写注释
1 2 3 | create table test1 (
field_name int comment '字段的注释'
)comment= '表的注释' ;
|
修改表的注释
1 | alter table test1 comment '修改后的表的注释' ;
|
修改字段的注释
1 2 3 | alter table test1 modify column field_name int comment '修改后的字段注释' ;
|
查看表注释的方法
1 2 3 4 5 | show create table test1;
use information_schema;
select * from TABLES where TABLE_SCHEMA= 'my_db' and TABLE_NAME= 'test1' \G
|
查看字段注释的方法
1 2 3 4 | show full columns from test1;
select * from COLUMNS where TABLE_SCHEMA= 'my_db' and TABLE_NAME= 'test1' \G
|
相关推荐:《mysql教程》
以上就是MySQL如何添加注释的详细内容,更多文章请关注木庄网络博客!!
返回前面的内容
相关阅读 >>
如何查看设置mysql数据库编码的方式?
如何开启mysql的binlog日志
mysql如何创建多个联合索引
phpstorm如何通过ssh连接mysql数据库
如何让mysql中单句实现无限层次父子关系查询
mysql如何正确地利用aes_encrypt()与aes_decrypt()加解密
mysql8忘记密码的快速解决方法
mysql中关于exists和not exists的示例分享
mysql临时表的使用方法详解
mysql什么是预处理技术?预处理技术的使用
更多相关阅读请进入《mysql》频道 >>
机械工业出版社
本书主要讲述了数据模型、基于对象的数据库和XML、数据存储和查询、事务管理、体系结构等方面的内容。
转载请注明出处:木庄网络博客 » MySQL如何添加注释