mysql
来源:互联网 发布:淘宝网电热水龙头 编辑:程序博客网 时间:2024/05/16 09:00
1 创建表的时候写注释
create table test1
(
field_name int comment '字段的注释'
)comment='表的注释';
2 修改表的注释
alter table test1 comment '修改后的表的注释';
3 修改字段的注释
alter table test1 modify column field_name int comment '修改后的字段注释';
--注意:字段名和字段类型照写就行
4 查看表注释的方法
--在生成的SQL语句中看
show create table test1;
--在元数据的表里面看
use information_schema;
select * from TABLES where TABLE_SCHEMA='my_db' and TABLE_NAME='test1' \G
5 查看字段注释的方法
--show
show full columns from test1;
--在元数据的表里面看
select * from COLUMNS where TABLE_SCHEMA='my_db' and TABLE_NAME='test1' \G
6看索引
show index from abnormal_information;
show indexes from abnormal_information;
0 0
- Mysql
- MySql
- MYSQL
- MySQL
- mysql
- mysql
- mysql
- mysql
- Mysql
- Mysql
- mysql
- MySQL
- mysql
- Mysql
- mysql
- mysql
- mysql
- mySQL
- hdu 4941 Magical Forest map
- hd2522A simple problem
- Generate source code jar for Maven
- 一个人的旅行
- xml解析
- mysql
- Heat HA
- iOS内存常见问题
- 如何用win7自带的功能重新划分硬盘
- Android官方提供的支持不同屏幕大小的全部方法
- 吴博:京东应用架构设计与治理
- 接口的理解
- HDU Today
- extjs入门(一)