--------------------------------------------原 mysql中查看所有表、表字段、表注释、字段注释----------------------------------
-----查询所有表注释
SELECT TABLE_NAME, TABLE_COMMENT
FROM INFORMATION_SCHEMA.Tables
WHERE table_schema ='dasoujia'
---------------
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