IST
MMLab8-PreExam SQL.docx

Insert into ordersorderid customerid partid

Info icon This preview shows pages 3–4. Sign up to view the full content.

Insert into orders(OrderID, CustomerID, PartID, ShippingDates) Values(10308, 5, 72, “2015-09-12”) Insert into orders(OrderID, CustomerID, PartID, ShippingDates) Values(10309, 2, 11, 2014-12-01) Insert into orders Values (10310, 1, 90, 2016-04-22) Insert into orders Values(10311, 5, 26, 2016-08-18) Insert into stock Values(11, “Beer”, 72) Insert into stock Values(26, “Wrench”, 12) Insert into stock Values(72, “Scotch”, 34) Insert into stock Values(90, “Drill”, 62) Insert into stock Values(109, “Bench”, 11) Phase 5 – UPDATE Data Step 1 – Al Gore has decided to change his phone number. Write the appropriate statement to update his phone number to be ‘822-8384’. Update Customers Set Phone = 822-8384 Where Name = “Al Gore” Phase 6 – SELECT Step 1 – Write a SELECT statement to show the name and phone number of all individuals in the CUSTOMER table who live in the United States. Select Name,Phone From Customer Where Country = “United States” Step 2 – Write a SELECT statement to show the PartName and PartID of all parts that have a quantity less than 40 in the STOCK table. Select PartName, PartID, From Stock Where quantity < 40
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Step 3 – Write a statement to display the summation of all of the quantity of parts on hand in the STOCK table.
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.
  • Spring '08
  • MCCONN,CHARLOTTERYOO,JUNGWOO
  • PartID

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern