Jump to: navigation, search

Mysql UNCOMPRESS

From w3cyberlearnings

Contents

MySQL UNCOMPRESS Function

This function uncompresses a compressed string that created by COMPRESS().

Syntax UNCOMPRESS

  • str: string to uncompress
COMPRESS(str);

Example 1

mysql> SET @te=COMPRESS('good school');
Query OK, 0 rows affected (0.00 sec)

mysql> SELECT @te;
+-------------------------+
| @te                     |
+-------------------------+
| 
     x�K��OQ(N����� ���R | 
+-------------------------+
1 row in set (0.01 sec)

mysql> SELECT UNCOMPRESS(@te);
+-----------------+
| UNCOMPRESS(@te) |
+-----------------+
| good school     | 
+-----------------+
1 row in 

Example 2


mysql> INSERT INTO blobtext(text) VALUES(COMPRESS('king and queen'));
Query OK, 1 row affected (0.00 sec)

mysql> SELECT UNCOMPRESS(text) FROM blobtext ;
+------------------+
| UNCOMPRESS(text) |
+------------------+
| king and queen   | 
+------------------+
1 rows in set (0.01 sec)

Related Links


Navigation
Web
SQL
MISC
References