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

c_view2.sql

The following command file creates a view on the orders and items tables:

CREATE VIEW someorders (custnum,ocustnum,newprice) AS 
   SELECT orders.order_num, items.order_num,
         items.total_price*1.5
      FROM orders, items
      WHERE orders.order_num = items.order_num
      AND items.total_price > 100.00;
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]