Which statement is true regarding the output of this SQL statement?

View the Exhibit and examine the description of the ORDER_ITEMS and PRODUCT_INFORMATION tables. The ORDER_ITEM table has records pertaining to details for each product in an order. The PRODUCT_INFORMATION table has records for all the products available for ordering. Evaluate the following SQL statement:
SELECT oi.order_id, pi.product_id
FROM order_items oi RIGHT OUTER JOIN product_information pi ON (oi.product_id=pi.product_id);
Which statement is true regarding the output of this SQL statement?

View the Exhibit and examine the description of the ORDER_ITEMS and PRODUCT_INFORMATION tables.

The ORDER_ITEM table has records pertaining to details for each product in an order. The PRODUCT_INFORMATION table has records for all the products available for ordering. Evaluate the following SQL statement:
SELECT oi.order_id, pi.product_id
FROM order_items oi RIGHT OUTER JOIN product_information pi ON (oi.product_id=pi.product_id);

Which statement is true regarding the output of this SQL statement?

A.
The query would return the ORDER_ID and PRODUCT_ID for only those products that are ordered.

B.
The query would return the ORDER_ID and PRODUCT_ID for the products that are ordered as well as for the products that have never been ordered.

C.
The query would return the ORDER_ID and PRODUCT_ID for the products that are ordered but not listed in the PRODUCT_INFORMATION table.

D.
The query would return the ORDER_ID and PRODUCT_ID for those products that are ordered as well as for the products that have never been ordered, and for the products that are not listed in the PRODUCT_INFORMATION table.



Leave a Reply 0

Your email address will not be published. Required fields are marked *