16.10 - Example: Compression Using ALC Only - Teradata Database

Teradata Database SQL Data Types and Literals

prodname
Teradata Database
vrm_release
16.10
created_date
June 2017
category
Programming Reference
featnum
B035-1143-161K

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