SQL: Create a SQL query that uses a correlated subquery to display the descriptions for products provided by a vendor in area code 904. The outer query will use the PRODUCT table, then use WHERE EXISTS, then the subquery which will use the VENDOR and PRODUCT tables via a join (a join should be used here). [hint: you should have 3 records of output].  My code: select p_descript from product where exist(select v_areacode from vendor where v_areacode = '904') ; I am getting an error but I can't see what is missing. ORA-00936: missing expression

Principles of Information Systems (MindTap Course List)
12th Edition
ISBN:9781285867168
Author:Ralph Stair, George Reynolds
Publisher:Ralph Stair, George Reynolds
Chapter10: Information And Decision Support Systems
Section: Chapter Questions
Problem 1DQ3
icon
Related questions
icon
Concept explainers
Question

SQL:

Create a SQL query that uses a correlated subquery to display the descriptions for products provided by a vendor in area code 904. The outer query will use the PRODUCT table, then use WHERE EXISTS, then the subquery which will use the VENDOR and PRODUCT tables via a join (a join should be used here). [hint: you should have 3 records of output]. 

My code:

select p_descript from product where exist(select v_areacode from vendor where v_areacode = '904') ;

I am getting an error but I can't see what is missing.

ORA-00936: missing expression

CUSTOMER
aus CODE
CUS LNAME
CUS FNAME
CUS INITIAL
CUS AREACODE
CUS PHONE
CUS BALANCE
PRODUCT
PODE.
DESCRI PT
INDATE
PCOH
P MIN
P PRICE
P DISOOUNT
V_CODE
VENDOR
V CODE
V NAME
V CONTACT
V_AREACODE
V PHONE
V STATE
V ORDER
INVOICE
INV NUMBER
CUS CODE
INV DATE
UNE
INV NIMBER
TINE NUMBER
P OODE
INE UNITS
LINE PRICE
EMPLOYEE
00
EMP NUM
BMP TITLE
EMP LNAME
BMP ANAME
BMP_INITIAL
EMP DOB
BMP HI RE DATE
BMP AREACODE
EMP PHONE
1 BMP_MGR
G瓦图
164%
Transcribed Image Text:CUSTOMER aus CODE CUS LNAME CUS FNAME CUS INITIAL CUS AREACODE CUS PHONE CUS BALANCE PRODUCT PODE. DESCRI PT INDATE PCOH P MIN P PRICE P DISOOUNT V_CODE VENDOR V CODE V NAME V CONTACT V_AREACODE V PHONE V STATE V ORDER INVOICE INV NUMBER CUS CODE INV DATE UNE INV NIMBER TINE NUMBER P OODE INE UNITS LINE PRICE EMPLOYEE 00 EMP NUM BMP TITLE EMP LNAME BMP ANAME BMP_INITIAL EMP DOB BMP HI RE DATE BMP AREACODE EMP PHONE 1 BMP_MGR G瓦图 164%
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Query Syntax
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
Principles of Information Systems (MindTap Course…
Principles of Information Systems (MindTap Course…
Computer Science
ISBN:
9781285867168
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning