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

c_orders.sql

The following command file creates the orders table:

CREATE TABLE orders
   (
   order_num            SERIAL(1001),
   order_date           DATE,
   customer_num         INTEGER NOT NULL,
   ship_instruct        CHAR(40),
   backlog              CHAR(1),
   po_num               CHAR(10),
   ship_date            DATE,
   ship_weight          DECIMAL(8,2),
   ship_charge          MONEY(6),
   paid_date            DATE,
   PRIMARY KEY (order_num),
   FOREIGN KEY (customer_num) REFERENCES customer (customer_num)
   );
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]