mysql中查看所有表、表字段、表注释、字段注释

查看所有表和表注释
select
TABLE_NAME,
TABLE_COMMENT
from
INFORMATION_SCHEMA.Tables
where
table_schema = ‘某数据库名称‘
 
INFORMATION_SCHEMA.Tables:
TABLE_SCHEMA,TABLE_NAME,CREATE_TIME,UPDATE_TIME,CHECK_TIME,TABLE_COMMENT
 
查看所有字段和字段注释
select
COLUMN_NAME,
COLUMN_COMMENT
from
INFORMATION_SCHEMA.Columns
where
table_name = ‘表名‘
and table_schema=‘数据库名‘
 
INFORMATION_SCHEMA.Columns:
TABLE_SCHEMA,TABLE_NAME,COLUMN_NAME, COLUMN_TYPE, COLUMN_KEY

mysql中查看所有表、表字段、表注释、字段注释

上一篇:@RequestParam和@PathVariable的区别和使用


下一篇:MySQL Explain 性能优化必杀技(新)