MySQL UNCOMPRESSED_LENGTH() function
UNCOMPRESSED_LENGTH() function
MySQL UNCOMPRESSED_LENGTH() returns the length of the string before it had been compressed.
Syntax:
UNCOMPRESSED_LENGTH(string)
Argument:
Name | Description |
---|---|
str | A compressed string. |
Syntax Diagram:

MySQL Version: 5.6
Example:
Code:
SELECT UNCOMPRESSED_LENGTH(COMPRESS('w3resource'));
Explanation
The above MySQL statement returns 10, which is the length of the original string w3resource.
Sample Output:
mysql> SELECT UNCOMPRESSED_LENGTH(COMPRESS('w3resource')); +---------------------------------------------+ | UNCOMPRESSED_LENGTH(COMPRESS('w3resource')) | +---------------------------------------------+ | 10 | +---------------------------------------------+ 1 row in set (0.00 sec)
Previous: UNCOMPRESS()
Next: MySQL Bit functions BIT_COUNT
- Weekly Trends
- Java Basic Programming Exercises
- SQL Subqueries
- Adventureworks Database Exercises
- C# Sharp Basic Exercises
- SQL COUNT() with distinct
- JavaScript String Exercises
- JavaScript HTML Form Validation
- Java Collection Exercises
- SQL COUNT() function
- SQL Inner Join
- JavaScript functions Exercises
- Python Tutorial
- Python Array Exercises
- SQL Cross Join
- C# Sharp Array Exercises
We are closing our Disqus commenting system for some maintenanace issues. You may write to us at reach[at]yahoo[dot]com or visit us at Facebook