17.10 - Example: Compression Using ALC Only - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - Data Types and Literals

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1143-171K
Language
English (United States)

In this example, assume that the default server character set is UNICODE. The NULLs in the Description column are compressed. The non-null values of the Description column are compressed using the Teradata-supplied function, TransUnicodeToUTF8. The TransUTF8ToUnicode function uncompresses the values compressed by the TransUnicodeToUTF8 function.

CREATE TABLE Pendants
   (ItemNo INTEGER,
    Description VARCHAR(1000)
       COMPRESS USING TD_SYSFNLIB.TransUnicodeToUTF8
       DECOMPRESS USING TD_SYSFNLIB.TransUTF8ToUnicode);