MySQL Database Questions A. Which of the following commands is used to join the
ID: 3732781 • Letter: M
Question
MySQL Database Questions
A. Which of the following commands is used to join the P DESCRIPT and P PRICE fields from the PRODUCT table and the V NAME, V AREACODE, V PHONE and V CONTACT fields from the VENDOR table where the values of V CODE match? B. Which command is used to join the P DESCRIPT and P PRICE fields from the PRODUCT table and the V NAME, V AREACODE, V PHONE, and V CONTACT fields from the VENDOR table where the values of V CODE match and the output is ordered by P_PRICE? al. SELECT P.DESCRIPT, P_PRICE, V NAME, V CONTACT, V AREACODE, V_PHONE FROM PRODUCT, VENDOR WHERE PRODUCT-V-CODE VENDOR-V. CODE: a. SELECT P DESCRIPT, P PRICE, V NAME, V CONTACT, V AREACODE, V PHONE FROM PRODUCT, VENDOR WHERE ORDER BY P PRICE; b. PRODUCT.V CODEVENDOR.V CODE; SELECT FROM PRODUCT, VENDOR WHERE P DESCRIPT, P PRICE, V NAME, V CONTACT, V AREACODE, V PHONE b. PRODUCT.V-CODE VENDOR-V-CODE; SELECT PDESCRIPT, P PRICE, V_NAME, V CONTACT, V AREACODE, V PHONE FROM PRODUCT, VENDOR WHERE ORDER BY P PRICE; PRODUCT.V-CODE VENDOR.V-CODE; SELECT P DESCRIPT, P PRICE, V NAME, V CONTACT, V AREACODE, V PHONE FROM PRODUCT, VENDOR WHERE PRODUCT.V CODE-VENDORV CODE; d. SELECT PDESCRIPT FROM PRODUCT, VENDOR WHERE SELECT P DESCRIPT, P PRICE, V NAME, V CONTACT, VAREACODE, V PHONE FROM PRODUCT, VENDOR WHERE ORDER BY P_PRICE; P PRICE, V NAME, V CONTACT, V AREACODE, V PHONE PRODUCT.V-CODE = VENDOR.V.CODE; PRODUCT-VCODE = VENDOR.VCODE: - - d. SELECT FROM PRODUCT, VENDOR WHERE ORDER BY P PRICE; P DESCRIPT, P PRICE, V NAME, V CONTACT, V AREACODE, V PHONE PRODUCT.V-CODE => VENDORCODE: C. After writing embedded SQL code within the host language instructions, the next step would be to a. use the embedded SQL statement to retrieve data from the database b. compile the program using the host language compiler to create an object c. transform the embedded SQL into specialized DBMS-specific procedure d. create an access plan module to run the embedded code at run time code module calls using a preprocessorExplanation / Answer
Answer is as follows:
a) Correct Option is D
Here we know that V_code for both the tables is equal i.e. define in option D as Product.V_code = Vendor.V_code.
Here "=" operator find the match between both.
b) Correct Option is C
Half is same as part a istead of ORDER BY clause is used on P_Price.
i.e. done in option C.
c) The next step is to used Precompiler to transform the embeded SQL into specialized DBMS.
i.e. equal to the option C.
So correct option is C.
if there is any query please ask in comments...
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.