导出表字段sql
SELECT
COLUMN_NAME 列名,
COLUMN_TYPE 数据类型,
DATA_TYPE 字段类型,
CHARACTER_MAXIMUM_LENGTH 长度,
IS_NULLABLE 是否为空,
COLUMN_DEFAULT 默认值,
COLUMN_COMMENT 备注
FROM
INFORMATION_SCHEMA.COLUMNS
WHERE
table_schema = '1234'
AND table_name = '1235'
ORDER BY ORDINAL_POSITION asc
table_schema 数据库名
table_name 表名
ORDINAL_POSITION 排序字段