The c_calls.sql command file

The following command file creates the cust_calls table:
CREATE TABLE cust_calls
   customer_num          INTEGER,
   call_dtime            DATETIME YEAR TO MINUTE,
   user_id               CHAR(18) DEFAULT USER,
   call_code             CHAR(1),
   call_descr            CHAR(240),
   res_dtime             DATETIME YEAR TO MINUTE,
   res_descr             CHAR(240),
   PRIMARY KEY (customer_num, call_dtime),
   FOREIGN KEY (customer_num) REFERENCES customer (customer_num),
   FOREIGN KEY (call_code) REFERENCES call_type (call_code)

Copyright© 2018 HCL Technologies Limited