DDL for the Employee Table - Basic Teradata Query - 16.20

Basic Teradata Query Reference

prodname
Basic Teradata Query
vrm_release
16.20
category
Programming Reference
featnum
B035-2414-108K
CREATE SET TABLE workforce.employee
  , FALLBACK
  , NO BEFORE JOURNAL
  , NO AFTER JOURNAL
  , CHECKSUM = DEFAULT
  , DEFAULT MERGEBLOCKRATIO
(
    EmpNo     SMALLINT
                FORMAT '9(5)'
                CHECK ( (EmpNo >=  10001 ) AND  (EmpNo <=  32001 ) )
                NOT NULL
  , Name      VARCHAR(12)
                CHARACTER SET LATIN NOT CASESPECIFIC
                NOT NULL
  , DeptNo    SMALLINT
                FORMAT '999'
                CHECK ( (DeptNo >=  100 ) AND  (DeptNo <=  900 ) )
  , JobTitle  VARCHAR(12)
                CHARACTER SET LATIN NOT CASESPECIFIC
  , 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       CHAR(1)
                CHARACTER SET LATIN UPPERCASE NOT CASESPECIFIC
                NOT NULL
  , Race      CHAR(1)
                CHARACTER SET LATIN UPPERCASE NOT CASESPECIFIC
  , MStat     CHAR(1)
                CHARACTER SET LATIN UPPERCASE NOT CASESPECIFIC
  , EdLev     BYTEINT
                FORMAT 'Z9'
                CHECK ( (EdLev >=  0 ) AND  (EdLev <=  22) )
                NOT NULL
  , HCap      BYTEINT
                FORMAT 'Z9'
                CHECK ( (HCap >=  -99 ) AND  (HCap <=  99 ) )
)
UNIQUE PRIMARY INDEX ( EmpNo )
INDEX ( Name )
;
DDL for the Department Table :