ID EN
Encryption and Compression Functions

UNCOMPRESS(string_to_uncompress)

MySQL 8.4

Uncompresses a string compressed by the COMPRESS() function. If the argument is not a compressed value, the result is NULL; if string_to_uncompress is NULL, the result is also NULL. This function requires MySQL to have been compiled with a compression library such as zlib. Otherwise, the return value is always NULL.

Syntax

MYSQL
SELECT UNCOMPRESS(COMPRESS('any string'));
'any string'
SELECT UNCOMPRESS('any string');
NULL

Examples

Example
MYSQL
SELECT UNCOMPRESS(COMPRESS('any string'));
'any string'
SELECT UNCOMPRESS('any string');
NULL