SELECT COLUMN_NAME AS 字段名称, COLUMN_COMMENT AS 字段描述, COLUMN_TYPE AS 类型 , (CASE WHEN IS_NULLABLE = 'YES' THEN '是' ELSE '否' END) AS 是否为空 FROM information_schema.`COLUMNS` WHERE TABLE_SCHEMA = (select database()) AND TABLE_NAME = ('Dev_mail') ORDER BY ORDINAL_POSITION;
效果:
导出数据:
然后一直下一步即可。