查询语句
SELECT
column_name AS '字段名称',
column_type AS '字段类型',
column_comment AS '字段描述',
IF(column_key='PRI','是','否') AS '是否主键唯一',
IF(IS_NULLABLE='NO','是','否') AS '是否非空必填'
FROM
information_schema. COLUMNS
WHERE
TABLE_SCHEMA = '库名'
AND table_name = '表名';