利用Navicat生成Mysq表结构文档

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/weixin_43215250/article/details/86689250
  1. 执行下面sql
    SELECT
    	ORDINAL_POSITION 序号,
    	COLUMN_NAME 列名,
    	COLUMN_TYPE 数据类型,
    	COLUMN_KEY 主键,
    	IS_NULLABLE 是否为空,
    	COLUMN_DEFAULT 默认值,
    	COLUMN_COMMENT 注释
    FROM
    	information_schema.`COLUMNS`
    WHERE
    	TABLE_SCHEMA = 'db_name'             -- 数据库名称
    AND table_name = 'table_name'            -- 表名
    
  2. 运行结果导出
    在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/weixin_43215250/article/details/86689250
今日推荐