15.10 - Example: Specifying DATABLOCKSIZE, CHECKSUM, and FREESPACE - Teradata Database

Teradata Database SQL Data Definition Language Syntax and Examples

prodname
Teradata Database
vrm_release
15.10
created_date
December 2015
category
Programming Reference
featnum
B035-1144-151K

This example includes options to specify a maximum data block size of 16,384 bytes (32 sectors), a disk I/O checksum of OFF, and 10 percent free space:

    CREATE TABLE employee, DATABLOCKSIZE = 16384 BYTES, CHECKSUM = OFF,
     FREESPACE = 10 PERCENT (
      empno    SMALLINT FORMAT '9(5)' 
               CHECK (empno >= 10001 AND empno <= 32001) NOT NULL,
      name     VARCHAR(12) NOT NULL,
      deptno   SMALLINT FORMAT '999' 
               CHECK (deptno >= 100 AND deptno <= 900),
      jobtitle VARCHAR(12),
      salary   DECIMAL(8,2) FORMAT 'ZZZ,ZZ9.99'
               CHECK (salary >= 1.00 AND salary <= 999000.00),
      yrsexp   BYTEINT FORMAT 'Z9' 
               CHECK (yrsexp >= -99 AND yrsexp <=99),
      dob      DATE FORMAT 'MMMbDDbYYYY' NOT NULL,
      sex      CHARACTER UPPERCASE NOT NULL,
      race     CHARACTER UPPERCASE,
      mstat    CHARACTER UPPERCASE,
      edlev    BYTEINT FORMAT 'Z9' 
               CHECK(edlev >=0 AND edlev <= 22) NOT NULL,
      hcap     BYTEINT FORMAT 'Z9' 
               CHECK (bcap >= -99 AND hcap <= 99)
    UNIQUE PRIMARY INDEX (empno),
    INDEX (name);