SELECT COLUMN_NAME 字段名称, COLUMN_TYPE 数据类型, IF(IS_NULLABLE='NO','是','否') AS '必填', COLUMN_COMMENT 注释 FROM INFORMATION_SCHEMA.COLUMNS where table_schema =‘Finance‘ AND table_name = ‘user‘
除了上面的例子还有哪些字段支持导出呢?具体参见mysql官方文档:
https://dev.mysql.com/doc/refman/8.0/en/columns-table.html