Which statement is true regarding the above query if on…

Evaluate the following SQL statement:

Which statement is true regarding the above query if one of the values generated by the subquery is null?

Evaluate the following SQL statement:

Which statement is true regarding the above query if one of the values generated by the subquery is null?

A.
It produces an error.

B.
It executes but returns no rows.

C.
It generates output for null as well as the other values produced by the subquery.

D.
It ignores the null value and generates output for the other values produced by the subquery.



Leave a Reply 3

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


edm

edm

Answer should be C.

Tim

Tim

Tested it and it seems to ignore NULL values.
(That is the outer statement won’t return customers with cust_credit_limit of NULL.)

Hola

Hola

anat
January 13, 2016 at 12:34 am

When you use IN, you’re telling SQL to take a value and compare it against every value or set of values in a list using =. If any NULL values exist, a row will not be returned—even if both values are NULL.
D is correct