146.Evaluate the following SQL statement:

来源:互联网 发布:linux 赋值 命令结果 编辑:程序博客网 时间:2024/05/23 19:59
146.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.
答案:C
解析:这里选择C,in不会忽略null,如果是not in的话,会忽略null,oracle会将
not in(expr1)变成not in(expr1,null)
0 0
原创粉丝点击