The following CREATE TABLE fragment specifies that all occurrences of 'cashier', 'manager', and 'programmer' for the jobtitle column and all nulls are to be compressed to zero space.
Nulls are compressed by default whether or not there is an argument to the COMPRESS attribute specified for a column.
This definition saves 30 bytes for each row whenever an employee has one of the following job titles:
- Null
- Cashier
- Manager
- Programmer
CREATE TABLE employee ( employee_number INTEGER ... jobtitle CHARACTER(30) COMPRESS (’cashier’, ’manager’, ’programmer’) ... );