COMPRESS()
COMPRESS(string)This function returns a given string after compressing it. It
requires MySQL to have been compiled with a compression library (e.g.,
zlib). If it wasn’t, a NULL value will be returned.
This statement is available as of version 4.1 of MySQL. Here is an
example:
UPDATE students_records SET personal_essay = (SELECT COMPRESS(essay) FROM student_applications WHERE applicant_id = '7382') AS derived1 WHERE student_id = '433302000';
If you want to store a value that was compressed with this
function, it’s best to store it in a BLOB column,
since the results are binary. Use UNCOMPRESS() to
uncompress a string that was compressed with this function.