DDL for the Employee Table - Basic Teradata Query

Basic Teradata Query Reference

Product
Basic Teradata Query
Release Number
16.10
Published
May 2017
Language
English (United States)
Last Update
2018-06-28
dita:mapPath
wmy1488824663431.ditamap
dita:ditavalPath
Audience_PDF_include.ditaval
dita:id
B035-2414
lifecycle
previous
Product Category
Teradata Tools and Utilities
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 :