Evaluate the following SQL statement:
SQL> SELECT cust_id, cust_last_name
FROM customers
WHERE cust_credit_limit IN
(select cust_credit_limit
FROM customers
WHERE cust_city =’Singapore’);
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.
D
Thank you I went with D and I knew I wasn’t crazy if it’s not D someone has some explaining to do
D – tested… if in your table you have 1 result for WHERE cust_city=… then will be B. In this one you have more then 1 result so it ignores the NULL value and generates output for the other values produced by the subquery.