Home | Previous Page | Next Page   Appendix B. Demonstration SQL > SQL Files for the Relational Database Model >

c_calls.sql

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)
   );
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]