Given table R(A,B,C) and S(C,D,E), which of the following SQL statements would find the record(s) with null values on the column C in table R?

a. select * from R, S where R.C = S.C (+); (R left outer join S)

b. select * from R, S where S.C = R.C (+); (R right outer join S)

c. either a. or b.

d. neither a. nor b.

Respuesta :

Answer:

a. select * from R, S where R.C = S.C (+); (R left outer join S)

Explanation:

In SQL, left outer join of two tables R and S joined on a common column C means that all rows of R are included in the result including those rows for which value of R.C is null. On the contrary, right outer join of two tables R and S joined on a common column C means that all rows of S are included in the result including those rows for which value of S.C is null. As per the question our requirement is the former. So option a is correct.