16.10 - Example: ALC Using the LZCOMP Function - 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, the NULLs in the Description column are compressed. The non-null UNICODE values in the Description column are compressed using the Teradata-supplied LZCOMP function. The LZDECOMP function uncompresses the values compressed by LZCOMP.

   CREATE MULTISET TABLE Pendants
      (ItemNo INTEGER,
       Gem CHAR(10) UPPERCASE CHARACTER SET UNICODE,
       Description VARCHAR(1000) CHARACTER SET UNICODE
          COMPRESS USING TD_SYSFNLIB.LZCOMP
          DECOMPRESS USING TD_SYSFNLIB.LZDECOMP);