mysql生成数据字典
通过information_schema 读取数据库信息1234567891011121314SELECT C.TABLE_NAME AS '表', T.TABLE_COMMENT AS '表名', C.COLUMN_NAME AS '字段名', C.COLUMN_TYPE AS '数据类型', C.COLUMN_COMMENT AS '字段说明', C.IS_NULLABLE AS '允许为空', C.COLUMN_KEY AS '键'FROM information_schema.COLUMNS CINNER JOIN information_schema.TABLES T ON C.TABLE_SCHEMA = T.TABLE_SCHEMAAND C.TABLE_NAME = T.TABLE_NAMEWHERE T.TABLE_SCHEMA = '数据库名'