MySQL通过查询导出数据字典

SELECT
    TABLE_NAME AS '表名',
    COLUMN_NAME AS '字段名',
    COLUMN_TYPE AS '数据类型',
    IF(IS_NULLABLE='YES','是','否') AS '是否可为空',
    COLUMN_COMMENT AS '字段说明' 
FROM
    information_schema.`COLUMNS` 
WHERE
    TABLE_SCHEMA = '数据库名称'

你可能感兴趣的:(#,MySQL,mysql,数据字典)