-- 查询表字段信息
SHOW FULL COLUMNS FROM database.table;
-- 查询表详细信息
SELECT
TABLE_SCHEMA as 所属库,
TABLE_NAME as 表名称,
ENGINE as 引擎,
CREATE_TIME as 创建时间,
UPDATE_TIME as 修改时间,
TABLE_COMMENT as 表注释
FROM
information_schema.`TABLES`
WHERE
TABLE_SCHEMA = 'database' AND -- 库名称
TABLE_NAME = 'table'; -- 表名称