Mysql中怎么查询数据字典

Mysql中怎么查询数据字典,相信很多没有经验的人对此束手无策,为此本文总结了问题出现的原因和解决方法,通过这篇文章希望你能解决这个问题。

SELECT
        a.TABLE_NAME as tableName,
b.TABLE_COMMENT as tableComment,
        a.COLUMN_NAME as columnName,
        a.COLUMN_COMMENT as columnComment,
        a.COLUMN_TYPE as columnType,
        null as length,
        null as scale,
        a.IS_NULLABLE as isNullable
        from information_schema.COLUMNS a
        LEFT JOIN information_schema.TABLES b ON a.TABLE_NAME=b.TABLE_NAME
        where a.TABLE_SCHEMA='hbsm' and a.TABLE_NAME 
in('t_sm_saleapply_benef_status')
order by a.TABLE_NAME

看完上述内容,你们掌握Mysql中怎么查询数据字典的方法了吗?如果还想学到更多技能或想了解更多相关内容,欢迎关注行业资讯频道,感谢各位的阅读!