17.10 - PERSONNELデータベース表のためのDDL - MultiLoad

Teradata® MultiLoadリファレンス

Product
MultiLoad
Release Number
17.10
Release Date
2021年6月
Content Type
プログラミング リファレンス
Publication ID
B035-2409-061K-JPN
Language
日本語 (日本)
 CREATE TABLE charges ,FALLBACK ,
     NO BEFORE JOURNAL,
     NO AFTER JOURNAL
     (
     EmpNo SMALLINT FORMAT '9(5)' TITLE 'Employee//Id'
        BETWEEN 10001 AND 32001  NOT NULL,
     Proj_Id CHAR(8) TITLE 'Project//  Id' NOT NULL,
     WkEnd DATE TITLE 'Week//Ending',
     Hours DECIMAL(4,1) FORMAT 'ZZ9.9' BETWEEN 0.5 AND 999.5 )
PRIMARY INDEX( EmpNo ,Proj_Id )
INDEX( Proj_Id );
CREATE TABLE department ,FALLBACK ,
    NO BEFORE JOURNAL,
    NO AFTER JOURNAL
    (
               DeptNo SMALLINT FORMAT '999' BETWEEN 100 AND 900
               NOT NULL,
    DeptName VARCHAR(14),
    Loc CHAR(3),
    MgrNo SMALLINT FORMAT '9(5)' BETWEEN 10001 AND 32001
       NOT NULL)
UNIQUE PRIMARY INDEX( DeptNo );
CREATE TABLE employee ,FALLBACK ,
    NO BEFORE JOURNAL,
    NO AFTER JOURNAL
    (
    EmpNo SMALLINT FORMAT '9(5)' BETWEEN 10001 AND 32001
       NOT NULL,
    Name VARCHAR(12),
     DeptNo SMALLINT FORMAT '999' BETWEEN 100 AND 900 ,
     PhoneNo SMALLINT FORMAT '9999' BETWEEN 1000 AND 9999,
     JobTitle VARCHAR(12),
     Salary DECIMAL(8,2) FORMAT 'ZZZ,ZZ9.99' BETWEEN 1.00 AND
        999000.00 ,
     YrsExp BYTEINT FORMAT 'Z9' BETWEEN -99 AND 99 ,
     DOB DATE FORMAT 'MMMbDDbYYYY',
     Sex CHAR(1) UPPERCASE,
     Race CHAR(1) UPPERCASE,
     MStat CHAR(1) UPPERCASE,
     EdLev BYTEINT FORMAT 'Z9' BETWEEN 0 AND 22,
     HCap BYTEINT FORMAT 'Z9' BETWEEN -99 AND 99 )
UNIQUE PRIMARY INDEX( EmpNo )
INDEX( Name );
CREATE TABLE project ,FALLBACK ,
    NO BEFORE JOURNAL,
    NO AFTER JOURNAL
    (
     Proj_Id CHAR(8) TITLE 'Project//  Id' NOT NULL,
     Description VARCHAR(25) TITLE '  Project Description',
     RecDate DATE TITLE 'Received//Date',
     DueDate DATE TITLE 'Due //Date',
     ComDate DATE TITLE 'Compl//Date')
UNIQUE PRIMARY INDEX( Proj_Id );