Answer to Question #76505 in Databases | SQL | Oracle | MS Access for J
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
1
2018-04-26T07:46:07-0400
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
Leave a comment