1. 程式人生 > >OCP-1Z0-051 第129題 RIGHT OUTER JOIN的使用

OCP-1Z0-051 第129題 RIGHT OUTER JOIN的使用

View the Exhibits and examine the structures of the PROMOTIONS and SALES tables.

Evaluate the following SQL statement:
SQL>SELECT p.promo_id, p.promo_name, s.prod_id
FROM sales s RIGHT OUTER JOIN promotions p
ON (s.promo_id = p.promo_id);
Which statement is true regarding the output of the above query?
A. It gives the details of promos for which there have been sales.
B. It gives the details of promos for which there have been no sales.
C. It gives details of all promos irrespective of whether they have resulted in a sale or not.
D. It gives details of product ID s that have been sold irrespective of whether they had a promo or not.

答案:C