Example: Changing the Value Compression for a Compressed Column - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.00
Published
September 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
wgr1555383704548.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1144
lifecycle
previous
Product Category
Teradata Vantage™

Suppose a company that does business only in Santa Monica decides to expand. Previously, the city name Santa Monica was value-compressed. Now, the city name Los Angeles is to be value-compressed. The following example changes the single value-compressed city name value from Santa Monica to Los Angeles, which means that it should also be value-compressed:

     ALTER TABLE customer ADD city_name COMPRESS 'Los Angeles';

If city_name had not been multivalue-compressed previously, this request would multivalue-compress all occurrences of Los Angeles. Note that this is just an example, because Santa Monica and Los Angeles can be multivalue-compressed.