You are not logged in Log in Join
You are here: Home » Members » MJ's corner on Zope » QuantumPythons » Question7 » wikipage_view

Log in
Name

Password

 
 
FrontPage »

Question7

Question 7

Alter the table PRODUCTS by the addition of a column REORDER that will be of type integer. This is the level of the quantity below which the product should be reordered. Update the PRODUCT table with 100000 as the value for reorder for all PRODUCTs. Show the contents of PRODUCT table showing these changes. Include all SQL commands and the resultant output in your file.

SQL:

    alter table product
        add column reorder integer;

    update product
        set reorder = 100000;

    select * from product;

Output:

    p01     comb        Dallas  111400  0.55    100000
    p02     brush       Newark  203000  0.50    100000
    p03     razor       Duluth  150600  1.10    100000
    p04     pen         Duluth  125300  1.10    100000
    p05     pencil      Dallas  221400  1.10    100000
    p06     folder      Dallas  123100  2.20    100000
    p07     case        Newark  100500  1.00    100000


mj (Sep 14, 2001 10:20 pm; Comment #1)
This is my third.