Hi, please look at this oracle database assigment and point me in the right dire
ID: 3883985 • Letter: H
Question
Hi, please look at this oracle database assigment and point me in the right direction.
This is what I have to do:
Run SQL*Plus iggy/oracle. (It is assumed that you have already run the LoadDB.sql script last week that built the required user and tables (yes did that .)
Type SPOOL c:cis421bS3spool.txt . "Write a single SQL statement that lists all suppliers supplying only hammers WITHOUT using the difference operation. (A join or subquery would be appropriate.)"
When finished, stop the spooling and exit the program.
This is my data:
SQL> DESCRIBE iggy.part;
Name Null? Type
----------------------------------------- -------- ----------------------------
PARTNAME NOT NULL VARCHAR2(32)
SQL> SELECT * FROM iggy.part;
PARTNAME
--------------------------------
HAMMER
NAIL
SQL> DESCRIBE iggy.supplier;
Name Null? Type
----------------------------------------- -------- ----------------------------
SUPPLIERNAME NOT NULL VARCHAR2(32)
SQL> SELECT * FROM iggy.supplier;
SUPPLIERNAME
--------------------------------
NEW YANKEE WORKSHOP, INC.
OLD YANKEE WORKSHOP, INC.
TOOL TIME, INC.
SQL> DESCRIBE iggy.quote;
Name Null? Type
----------------------------------------- -------- ----------------------------
SUPPLIERNAME NOT NULL VARCHAR2(32)
PARTNAME NOT NULL VARCHAR2(32)
QUOTE NOT NULL NUMBER(8,2)
SQL> SELECT * FROM iggy.quote;
SUPPLIERNAME PARTNAME QUOTE
-------------------------------- -------------------------------- ----------
NEW YANKEE WORKSHOP, INC. HAMMER 1.89
NEW YANKEE WORKSHOP, INC. NAIL .19
OLD YANKEE WORKSHOP, INC. HAMMER 2.09
TOOL TIME, INC. HAMMER 1.99
TOOL TIME, INC. NAIL .2
SQL> SPOOL OFF;
Appriciate the help!!
Explanation / Answer
Select supplier.suppliername from supplier inner join quote on supplier.suppliername = quote.suppliername inner join part on part.partname = quote.partname where part.partname = 'HAMMER';
supplier,quote and part tables need to join
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.