drop table customer; CREATE TABLE CUSTOMER (CNO VARCHAR(3), CNAME VARCHAR(4), AREA VARCHAR(4)); INSERT INTO CUSTOMER VALUES ('C01', '李四', '台中'); INSERT INTO CUSTOMER VALUES ('C02', '丁一', '台南'); INSERT INTO CUSTOMER VALUES ('C03', '王五', '台北'); INSERT INTO CUSTOMER VALUES ('C04', '張三', '高雄'); INSERT INTO CUSTOMER VALUES ('C05', '劉三', '台南'); drop table orders; CREATE TABLE ORDERS (ODATE DATE, CNO VARCHAR(3), PNO VARCHAR(3), QTY INTEGER(3)); INSERT INTO ORDERS VALUES ('2008-11-03', 'C01', 'P01', 200); INSERT INTO ORDERS VALUES ('2008-11-05', 'C01', 'P01', 100); INSERT INTO ORDERS VALUES ('2008-11-03', 'C01', 'P03', 10); INSERT INTO ORDERS VALUES ('2008-11-07', 'C03', 'P04', 20); INSERT INTO ORDERS VALUES ('2008-11-08', 'C03', 'P04', 10); INSERT INTO ORDERS VALUES ('2008-11-08', 'C04', 'P03', 20); INSERT INTO ORDERS VALUES ('2008-11-07', 'C04', 'P04', 20); drop table product; CREATE TABLE PRODUCT (PNO VARCHAR(3), PNAME VARCHAR(4), PRICE INTEGER(3)); INSERT INTO PRODUCT VALUES ('P01', '西瓜', 50); INSERT INTO PRODUCT VALUES ('P02', '蘋果', 80); INSERT INTO PRODUCT VALUES ('P03', '鳳梨', 40); INSERT INTO PRODUCT VALUES ('P04', '香蕉', 20); INSERT INTO PRODUCT VALUES ('P05', '楊桃', 10); drop table ship; CREATE TABLE SHIP (AREA VARCHAR(4), FEE INTEGER(3)); INSERT INTO SHIP VALUES ('台北', 70); INSERT INTO SHIP VALUES ('台中', 100); INSERT INTO SHIP VALUES ('台南', 0); INSERT INTO SHIP VALUES ('高雄', 30); INSERT INTO SHIP VALUES ('澎湖', null); INSERT INTO SHIP VALUES ('花蓮', 50);