Example: Compression Using ALC Only

Teradata Vantageā„¢ Data Types and Literals

brand
Software
Teradata Vantage
prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1143-162K

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);