SELECT
TABLE_NAME,
TABLE_ROWS,
DATA_LENGTH / 1024 / 1024 "size",
CREATE_TIME,
TABLE_COLLATION
FROM
INFORMATION_SCHEMA. TABLES
WHERE
TABLE_SCHEMA = '库名'
ORDER BY
DATA_LENGTH DESC
查询数据库中每个表的各自行数和大小
于 2022-02-28 15:53:13 首次发布