• Carlo Romagnano - Tuesday, November 6, 2018 1:18 AM

    The return type is VARBINARY(MAX) , so, it should be CASTed to a char type.
    Also, there's an undocumented function UNCOMPRESS.
    select UNCOMPRESS(decompress(COMPRESS('a')))
    Try: it returns the starting string.

    What is the difference between UNCOMPRESS() and DECOMPRESS()?

    Why even both using COMPRESS(), DECOMPRESS(), or UNCOMPRESS()?

    Thanks