65 691
Assignments Done
99,2%
Successfully Done
In October 2018

Answer to Question #76505 in Databases | SQL | Oracle | MS Access for J

Question #76505
Table Customer_T has customer info including the CustomerID and CustomerName, while table Payment_T has every payment made by each CustomerID.

What statement would provide all records of payments made showing customer name?


SELECT PAYMENT.*, CUSTOMERNAME FROM PAYMENT_T


SELECT PAYMENT.*, CUSTOMERNAME FROM PAYMENT_T JOIN CUSTOMER_T ON PAYMENTID = CUSTOMERID


SELECT PAYMENT.*, CUSTOMERNAME FROM PAYMENT_T JOIN CUSTOMER_T ON CUSTOMERID = CUSTOMERID


SELECT PAYMENT.*, CUSTOMERNAME FROM PAYMENT_T P JOIN CUSTOMER_T C ON P.CUSTOMERID = C.CUSTOMERID
Expert's answer
This is a query that provides all the payments with corresponding customers' names:

SELECT payment.*, customername
FROM payment_t p JOIN customer_t c
ON p.customerid = c.customerid

Thus, the answer is 4th.

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions