📣
TiDB Cloud Premium is now in public preview. Unlimited growth, instant elasticity, advanced security for enterprise workloads. Try it out →

HUMANIZE_SIZE



Returns the readable size with a suffix(KiB, MiB, etc).

Syntax

HUMANIZE_SIZE(x);

Arguments

ArgumentsDescription
xThe numerical size.

Return Type

String.

Examples

SELECT HUMANIZE_SIZE(1024 * 1024) +-------------------------+ | HUMANIZE_SIZE((1024 * 1024)) | +-------------------------+ | 1 MiB | +-------------------------+

Was this page helpful?