服务器之家:专注于服务器技术及软件下载分享
分类导航

Mysql|Sql Server|Oracle|Redis|MongoDB|PostgreSQL|Sqlite|DB2|mariadb|Access|数据库技术|

服务器之家 - 数据库 - Mysql - mysql添加备注信息的实现

mysql添加备注信息的实现

2021-04-15 18:51HealerJean. Mysql

这篇文章主要介绍了mysql添加备注信息的实现,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧

前言

这连天有人问我一些mysql备注信息,不得已还是写一遍博客吧

1、创建表的时候,添加表名备注和字段备注

?
1
2
3
4
5
6
7
8
create table `healerjean_comment` (
 `id` bigint(20) not null auto_increment,
 `name` varchar(32) not null comment '名字备注',
 `email` varchar(64) not null,
 `message` text ,
 primary key (`id`),
 key `index_name` (`name`)
) comment='表名备注' ;

2、表创建完成添加表名备注和字段备注

?
1
2
alter table healerjean_comment comment='测试索引表';
alter table healerjean_comment modify name varchar(32) not null comment '名字备注'

3、查看备注信息

?
1
show create table healerjean;

mysql添加备注信息的实现

?
1
show full columns from healerjean;

mysql添加备注信息的实现

到此这篇关于mysql添加备注信息的实现的文章就介绍到这了,更多相关mysql添加备注信息内容请搜索服务器之家以前的文章或继续浏览下面的相关文章希望大家以后多多支持服务器之家!

原文链接:https://blog.csdn.net/u012954706/article/details/81239482

延伸 · 阅读

精彩推荐