how to insert

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • srinitkdag
    New Member
    • Apr 2007
    • 1

    how to insert

    hi,

    The database scheme consists of four relations:

    Product(maker, model, type)
    PC(code, model, speed, ram, hd, cd, price)
    Laptop(code, model, speed, ram, hd, screen, price)
    Printer(code, model, color, type, price)

    i want to Add to the Product table following products from maker Z:
    printer model 4003, PC model 4001 and laptop model 4002
  • Anthony23
    New Member
    • Apr 2007
    • 1

    #2
    Use this SQL code:
    Code:
    Insert into PRODUCT
        (MAKER, MODEL, TYPE)
        values ('Z', '4001', 'Printer');
    Repeat for the other values you want to insert.

    Comment

    • sairam12
      New Member
      • Aug 2014
      • 1

      #3
      USE THIS CODE:

      Insert into product select 'Z',4001,'pc' union all select 'Z',4002,'lapto p' union all select 'Z',4003,'print er'

      Comment

      Working...