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

来源:互联网 发布:淘宝模特兼职的骗局 编辑:程序博客网 时间:2024/05/21 10:19
129.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

解析:right join 的用法

0 0
原创粉丝点击