Compresses the string to take less space than the original string would take. In this example the original string takes
70
bytes and compressed string takes
22
bytes
SELECT 
    REPEAT('abc-123', 10) full_string,
    LENGTH(REPEAT('abc-123', 10)) full_string_length,
    COMPRESS(REPEAT('abc-123', 10)) compressed_string,
    LENGTH(COMPRESS(REPEAT('abc-123', 10))) compressed_string_lengtha
by Valeri Tandilashvili
4 years ago
MySQL
String functions
Full MySQL Course for Beginners
1
Pro tip: use ```triple backticks around text``` to write in code fences