w3resource
MYSQL Tutorial

MySQL UNCOMPRESS() function

UNCOMPRESS() function

MySQL uncompress() brings a compressed string back to its original condition. For compression, compress() function is used.

Syntax:

UNCOMPRESS(str)

Argument

Name Description
str A string.

Syntax Diagram:

MySQL UNCOMPRESS() Function - Syntax Diagram

MySQL Version: 5.6


Example:

Code:

SELECT UNCOMPRESS(COMPRESS('w3resource'));

Explanation

The above MySQL statement returns w3resource.

Sample Output:

mysql> SELECT UNCOMPRESS(COMPRESS('w3resource'));
+------------------------------------+
| UNCOMPRESS(COMPRESS('w3resource')) |
+------------------------------------+
| w3resource                         | 
+------------------------------------+
1 row in set (0.00 sec)

Previous: SHA1()
Next: UNCOMPRESSED_LENGTH()