互联网上的文章真TM不靠谱 还是自己来的好 --只写靠谱的文档

导出mysql数据库数据字典

USE information_schema;
SELECT
T.TABLE_NAME as '表名',
T.TABLE_COMMENT as '表说明', 
C.COLUMN_NAME AS '字段名',
C.COLUMN_COMMENT AS '字段说明',
C.COLUMN_TYPE AS '数据类型',
C.IS_NULLABLE AS '允许为空',
C.EXTRA AS '其他属性'
FROM
    COLUMNS C
INNER JOIN TABLES T ON C.TABLE_SCHEMA = T.TABLE_SCHEMA
AND C.TABLE_NAME = T.TABLE_NAME
WHERE
    T.TABLE_SCHEMA = '表名' 

标签: 数据字典

已有 5 条评论

  1. 看的我热血沸腾啊https://www.jiwenlaw.com/

  2. 不错不错,我喜欢看

  3. 叼茂SEO.bfbikes.com

  4. 怎么收藏这篇文章?

  5. 不错不错,我喜欢看 www.jiwenlaw.com

添加新评论