Perform the following functions using the following commands on the tables created(see tables below) 2. Paste SQL and results for each. For the UPDATE command perform Select * and provide screenshot of the results.   Explain in at least 'one' sentence the business problem statement for 'each' of these queries.   Please do not use all these commands on similar tables. You need to diversify so that all your tables get involved in this assignment.     1.   UPDATE using WHERE (ampersand (&) in the clause) - 2.   SELECT using ROUND function - 3.   NON-EQUALITY join of two tables using the JOIN...ON - 4.   OUTER JOIN of two tables (LEFT or RIGHT join) - 5.   Create a new table (copy of existing table from your project) - then UPDATE one of row of the table and perform MERGE to keep them in sync -

Oracle 12c: SQL
3rd Edition
ISBN:9781305251038
Author:Joan Casteel
Publisher:Joan Casteel
Chapter5: Data Manipulation And Transaction Control
Section: Chapter Questions
Problem 5MC
icon
Related questions
Question

Perform the following functions using the following commands on the tables created(see tables below) 2. Paste SQL and results for each. For the UPDATE command perform Select * and provide screenshot of the results.

 

Explain in at least 'one' sentence the business problem statement for 'each' of these queries.

 

Please do not use all these commands on similar tables. You need to diversify so that all your tables get involved in this assignment.  

 

1.   UPDATE using WHERE (ampersand (&) in the clause) -

2.   SELECT using ROUND function -

3.   NON-EQUALITY join of two tables using the JOIN...ON -

4.   OUTER JOIN of two tables (LEFT or RIGHT join) -

5.   Create a new table (copy of existing table from your project) - then UPDATE one of row of the table and perform MERGE to keep them in sync -

 

My tables:

CREATE TABLE product_order_tbl (

  order_num CHAR(9) NOT NULL,

  product_no VARCHAR2(3) NOT NULL,

  product_description VARCHAR2(21) NOT NULL,

  product_unit_price NUMBER(5,2) NOT NULL,

  CONSTRAINT orderproduct_num_CK PRIMARY KEY (order_num, product_no)

);

 

CREATE TABLE product_info (

  product_no VARCHAR2(3) NOT NULL,

  product_description VARCHAR2(21) NOT NULL,

  CONSTRAINT product_no_pk PRIMARY KEY (product_no)

);

 

CREATE TABLE customer_tbl (

  customer_name VARCHAR2(10) NOT NULL,

  billing_address VARCHAR2(14) NOT NULL,

  billing_zip CHAR(5) NOT NULL,

  billing_city VARCHAR2(8) NOT NULL,

  CONSTRAINT customer_name_pk PRIMARY KEY (customer_name)

);

 

CREATE TABLE order_info (

  order_num VARCHAR(9),

  order_date DATE NOT NULL,

  customer_name VARCHAR2(10) NOT NULL,

  order_address VARCHAR2(30) NOT NULL,

  order_city VARCHAR2(9) NOT NULL,

  order_zip CHAR(5) NOT NULL,

  CONSTRAINT order_pk PRIMARY KEY (order_num),

  CONSTRAINT customer_name_fk FOREIGN KEY (customer_name) REFERENCES customer_tbl(customer_name)

);

 

SUBJECT: MYSQL

3NF
Order_Info
Customer_Name (FK) Order_address
Order _Num
2312/2019
Order_date
Order_city
Order_zip
11/2/2019
John Smith
3787 Pineview Dr
Cambridge
12210
Customer TBL
Billing address
2 Court Square
Customer Name
Billing_Zip
Billing_City
John Smith
12210
New York
Product Order TBL
Product_Info
Product No
Order _Num
2312/2019
2312/2019
2312/2019
Product_No
001
002
Product_description
Product Unit Price
Product_description
001
Front and rear cables 100
Front and rear cables
002
New set pedal arms
15
New set pedal arms
003
Labor 3HRS
5
[003
Labor 3HRS
Transcribed Image Text:3NF Order_Info Customer_Name (FK) Order_address Order _Num 2312/2019 Order_date Order_city Order_zip 11/2/2019 John Smith 3787 Pineview Dr Cambridge 12210 Customer TBL Billing address 2 Court Square Customer Name Billing_Zip Billing_City John Smith 12210 New York Product Order TBL Product_Info Product No Order _Num 2312/2019 2312/2019 2312/2019 Product_No 001 002 Product_description Product Unit Price Product_description 001 Front and rear cables 100 Front and rear cables 002 New set pedal arms 15 New set pedal arms 003 Labor 3HRS 5 [003 Labor 3HRS
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Multiple table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning