Write sql dmlnbspstatements that will modify data from


Problem:

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:

  • 1 new Category
  • Category Name = Fast Food
  • Category Description = Quick and Easy Meals
  • Provide a SELECT statement to show that the data was inserted.

2. Add the following products for your new Fast-Food category.

  • Product Name = French Fries
  • Supplier Name = Ma Maison
  • Category Name = Fast Food
  • QuantityPerUnit = 20 Sticks
  • UnitPrice = 4.99
  • UnitsInStock = 10
  • UnitsOnOrder = 25
  • ReorderLevel = 10
  • Disabled = 0
  • Product Name = Hamburger
  • Supplier Name = Grandma Kelly's Homestead
  • Category Name = Fast Food
  • QuantityPerUnit = 1 Patty
  • Unit Price 6.99
  • UnitsInStock = 0
  • UnitsOnOrder = 50
  • ReorderLevel = 5
  • Disabled = 0
  • 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.

  • 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.

  • 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.

Additional Information:

The question is from Computer Science and it explains about writing SQL DML statement which can modify data in tables.

Total Word Limit: 397 Words

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Write sql dmlnbspstatements that will modify data from
Reference No:- TGS01109618

Now Priced at $20 (50% Discount)

Recommended (96%)

Rated (4.8/5)