UNCOMPRESS
Description
The UNCOMPRESS function decompresses binary data into strings or values. You must ensure the binary data is the result of the COMPRESS function.
Syntax
UNCOMPRESS(<compressed_str>)
Parameters
| Parameter | Description |
|---|---|
<compressed_str> | Compressed binary data, parameter type is varchar or string |
Return Value
The return value type is the same as the input compressed_str type.
Special cases:
- Returns NULL if
compressed_stris not binary data obtained fromCOMPRESS.
Examples
select uncompress(compress('abc'));
+-----------------------------+
| uncompress(compress('abc')) |
+-----------------------------+
| abc |
+-----------------------------+
select uncompress(compress(''));
+--------------------------+
| uncompress(compress('')) |
+--------------------------+
| |
+--------------------------+
select uncompress('abc');
+-------------------+
| uncompress('abc') |
+-------------------+
| NULL |
+-------------------+
Keywords
UNCOMPRESS, COMPRESS