Using SQL DML For Data Modification In Tables

Question

Write SQL DML statements that will modify data from within a database.
Using the Northwind database, write a SQL DML statement that will modify the data. Base it on the following requirements:

1.    Using the Northwind database, write a script to insert the following data:
       o    1 new Category
       o    Category Name = Fast Food
       o    Category Description = Quick and Easy Meals
       o    Provide a SELECT statement to show that the data was inserted.
2.    Add the following products for your new Fast-Food category.
       o    Product Name = French Fries
       o    Supplier Name = Ma Maison
       o    Category Name = Fast Food
       o    QuantityPerUnit = 20 Sticks
       o    UnitPrice = 4.99
       o    UnitsInStock = 10
       o    UnitsOnOrder = 25
       o    ReorderLevel = 10
       o    Disabled = 0
       o    Product Name = Hamburger
       o    Supplier Name = Grandma Kelly's Homestead
       o    Category Name = Fast Food
       o    QuantityPerUnit = 1 Patty
       o    Unit Price 6.99
       o    UnitsInStock = 0
       o    UnitsOnOrder = 50
       o    ReorderLevel = 5
       o    Disabled = 0
       o    Provide a SELECT statement to show that the data was inserted.
3.    In an attempt to liquidate some products, provide a script to set all products in the Confections category that have more than 50 units in stock to a price of $10, and disable them.
       o    2 records should be affected.
4.    Change the discount in the Order Details table on all orders of products of an ordered quantity of more than 50 to that of the largest discount ever given on any product.
      o    159 records should be affected
5.    You have decided against the new Fast-Food category. Provide a SQL statement to delete the Fast-Food category as well as any products assigned to that category.

Summary

The question belongs to Computer Science and it discusses about writing SQL DML statement that can modify data in the tables.

Total Word Count 397

Download Full Solution

Comments

  • HWA
    Rasha

    this is a very good website

  • HWA
    maani

    I have 50 questions for the same test your page is showing only 28

  • HWA
    joeanne

    hi can you please help or guide me to answer my assignments. thanks

  • HWA
    joeanne

    hi can anyone help or guide me to my assignments. thanks

  • HWA
    Monik


  • HWA
    Cristina

    This solution is perfect ...thanks

  • HWA
    Janete

    Hello Allison,I love the 2nd image that you did! I also, had never heard of SumoPaint, is something that I will have to exolpre a bit! I understand completely the 52 (or so) youtube videos that you probably watched. Sometimes they have what you want, sometimes they don't! However, it is always satisfying when you are able to produce something that you have taught yourself. Great job!Debra 0 likes

  • HWA
    Sandeep

    Perfect bank of solution. 

  • HWA
    Oxana

    great !

  • HWA
    Paul Brandon-Fritzius

    thanks for the quick response. the solution looks good. :)

  • HWA
    tina Johnson

    thnx for the answer. it was perfect. just the way i wanted it. 

  • HWA
    Giuseppe

    works fine.