查询当前数据库的表列表和表注释
SELECT
table_name tableName,
ENGINE,
table_comment tableComment,
create_time createTime
FROM
information_schema. TABLES
WHERE
table_schema =(SELECT DATABASE());
查询指定表的字段和注释
SELECT
column_name columnName,
data_type dataType,
column_comment columnComment,
column_key columnKey,
extra
FROM
information_schema. COLUMNS
WHERE
table_schema =(SELECT DATABASE())
AND table_name = 'sys_menu';
ORDER BY
ordinal_position