首页 > 数据库 > Oracle > OCP 1Z0 051 146
|
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)
解析:
|
scott@TESTDB11>select comm from emp where deptno = 30;
scott@TESTDB11>select * from emp where comm in (select comm from emp where deptno = 30);
|
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/17013648/viewspace-1170628/ ,如需转载,请注明出处,否则将追究法律责任。