Question

Product ProductID ProductName ProductCost NumInInventory 1 China Plate 33.45 3 2 Book Shelf 24.54 2 3...

Product

ProductID

ProductName

ProductCost

NumInInventory

1

China Plate

33.45

3

2

Book Shelf

24.54

2

3

Ladel

3.45

5

4

Paper Towel Holder

2.35

15

…..

Write the SQL for each of the following.

  1. Select all products and all their details.
  1. Select all the names of the products.
  1. Select all products that cost more than $10.00.
  1. Increase the cost of all products by 4%.
  1. Insert a new product of your choice.

  1. Delete all products that cost more than $200.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Select all products and all their details.

Query:

Select * from Product;

Select all the names of the products.

Query:

Select ProductName from Product;

Select all products that cost more than $10.00.

Query:

Select * from Product where ProductCost > 10;

Increase the cost of all products by 4%.

Query:

Update Product

set ProductCost = ProductCost + (4/100)*ProductCost;

Insert a new product of your choice.

Query:

Insert into Product values(5,'Pen',6.50,10);

Delete all products that cost more than $200.

Query:

Delete from Product where ProductCost > 200;

Add a comment
Know the answer?
Add Answer to:
Product ProductID ProductName ProductCost NumInInventory 1 China Plate 33.45 3 2 Book Shelf 24.54 2 3...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • If possible please just send the SQL statement. Thank you Each question within deliverable 3 must begin on a new page and be sure to document the question as the title of each item at the top o...

    If possible please just send the SQL statement. Thank you Each question within deliverable 3 must begin on a new page and be sure to document the question as the title of each item at the top of each page. Also, using a 12-point font, include the SQL statement and then provide a screen shot of each query. The screen shots must include both the SQL statement and the results for each item below based on the data entered in...

  • Customer (CustomerId, CustomerName) Employee (EmployeeId, EmployeeName, Salary, SupervisorId) Product(ProductId, ProductName, ListPrice) Orders (OrderId, OrderDate, CustomerId, EmployeeId,...

    Customer (CustomerId, CustomerName) Employee (EmployeeId, EmployeeName, Salary, SupervisorId) Product(ProductId, ProductName, ListPrice) Orders (OrderId, OrderDate, CustomerId, EmployeeId, Total) OrderedProduct (OrderId, ProductId, Quantity, Price) Write the code to complete the methods in OrderJDBC.java (look for TODO items). <---**IN BOLD** throughout code. /* OrderJDBC.java - A JDBC program for accessing and updating an order database on MySQL. */ import java.io.File; import java.math.BigDecimal; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.SQLException; import java.sql.Statement; import java.util.Scanner; /** * An application for...

  • Deliverable 1. Simple SQL Statements Caution: Read the instructions carefully! Each question is based on a...

    Deliverable 1. Simple SQL Statements Caution: Read the instructions carefully! Each question is based on a single SQL statement, and the single SQL statement might contain sub-queries (additional SELECT statements) within the statement. Provide a list all of the Customer ID, Customer Names, and States and sort the list in alphabetical order by Customer Name. Provide a list of all of the Customer ID, Customer Names, and States, and sort the list by state with the Customer Names in alphabetical...

  • use workbench please Task 1: Create a database and name it practical2DB. (2 marks) Task 2:...

    use workbench please Task 1: Create a database and name it practical2DB. (2 marks) Task 2: Create all the four tables according to the relational scheme in Figure 1. (8 marks) Task 3: Insert 5 records to into each table. (5 marks) Task 4: Write a query to list alphabetically ordered names, addresses, and IDs of all the customers whose postcode is in (40150, 40400, 47500). (10 marks) Task 5: Delete 1 record from Products table using their primary keys....

  • -- drop tables DROP TABLE REQUEST CASCADE CONSTRAINTS; DROP TABLE FULLORDER CASCADE CONSTRAINTS; DROP TABLE PRODUCT...

    -- drop tables DROP TABLE REQUEST CASCADE CONSTRAINTS; DROP TABLE FULLORDER CASCADE CONSTRAINTS; DROP TABLE PRODUCT CASCADE CONSTRAINTS; DROP TABLE CUSTOMER CASCADE CONSTRAINTS; -- create and link tables CREATE TABLE CUSTOMER (    CustomerID   INTEGER,    Name       VARCHAR2(40),    City       VARCHAR2(20),    State       CHAR(2),    Zip       CHAR(5),    CONSTRAINT PK_CUSTOMER        PRIMARY KEY (CustomerID) ); CREATE TABLE PRODUCT (    ProductID   INTEGER,    Description   VARCHAR2(30),    Material   VARCHAR2(20),    Price       NUMBER(5,2),    CONSTRAINT PK_PRODUCT...

  • 2. Write a program to prepare email address with name of person, email ID. This program...

    2. Write a program to prepare email address with name of person, email ID. This program should collect number of persons with their details menstion in the above. Finally, print all the registerd preson with their details and also print selected particular person's emails. 1. Write a program to prepare departmental store records with item name, number of items. This program should collect number of items with its details menstion in the above. Finally, print all the registerd items with...

  • Underlying replenishment policies. 1. Wilson's formula 2. Order point method 3. Impact of discounting on replenishment...

    Underlying replenishment policies. 1. Wilson's formula 2. Order point method 3. Impact of discounting on replenishment I. Base Case Summary Getributes fully equipped bathrooms, as well as bathroom items (soap For a bathroom shelf, the supplier offered the following price the quantities ordered, with a replenishment period of usually The company Alsatian bathrooms distributes fu dishes, towel rails, tablets, etc.). For a bathr conditions: € 20 per unit, regardless of the quantitie one month. roduct is stable at 2,500 units....

  • There is no 1 or 2, only 3-5 Problem 4.34 Product-Costing Accuracy, Corporate Strategy, ABC Autotech...

    There is no 1 or 2, only 3-5 Problem 4.34 Product-Costing Accuracy, Corporate Strategy, ABC Autotech Manufacturing is engaged in the production of replacement parts for automobiles. One plant specializes in the production of two parts: Part #127 and Part #234, Part #127 pro- duced the highest volume of activity, and for many years it was the only part produced by the plant. Five years ago, Part #234 was added. Part #234 was more difficult to manufacture and required special...

  • 2) What were some of the key challenges they encountered? How did they overcome them? 3)...

    2) What were some of the key challenges they encountered? How did they overcome them? 3) What were some of the key takeaways they learned to use in the future? When I assumed the leadership of Heinz’s Asia/Pacific business, in 1993, the company’s revenues from that part of the world were hardly a blip—and I’d never visited most of the countries in the region. I made my first trip there soon after I took the job, and it really opened...

  • Please help for question 2 & 3 I was able to answer question #1. Ultratech, Inc.,...

    Please help for question 2 & 3 I was able to answer question #1. Ultratech, Inc., manufactures several different types of printed circuit boards; however, two of the boards account for the majority of the company’s sales. The first of these boards, a television circuit board, has been a standard in the industry for several years. The market for this type of board is competitive and price-sensitive. Ultratech plans to sell 79,000 of the TV boards in 20x4 at a...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT