UNCOMPRESS
Descriptionβ
The UNCOMPRESS function is used to COMPRESS binary data into strings or values, you need to make sure that the binary data needs to be the result of 'compress'.
Syntaxβ
UNCOMPRESS(<compressed_str>)
Parametersβ
Parameters | Description |
---|---|
<compressed_str> | Compressed binary data, parameter type is varchar or string |
Return Valueβ
The return value is the same as the input compressed_str
type
Special cases:
compressed_str
Returns NULL if the binary data is not compressed.
Exampleβ
select uncompress(compress('abc'));
+-----------------------------+
| uncompress(compress('abc')) |
+-----------------------------+
| abc |
+-----------------------------+
select uncompress(compress(''));
+--------------------------+
| uncompress(compress('')) |
+--------------------------+
| |
+--------------------------+
select uncompress(compress(abc));
+-------------------+
| uncompress('abc') |
+-------------------+
| NULL |
+-------------------+