1z0-071 Oracle Database 12c SQL 第19题 exists语句

Q19.Which two statements are true regarding the EXISTS operator used in the correlated subqueries?
(Choose two.)
A. The outer query stops evaluating the result set of the inner query when the first value is found.(right)
翻译: 外查询停止评估内查询的结果集,当第一个值被发现
B. It is used to test whether the values retrieved by the inner query exist in the result of the outer query.
翻译: 他被用以试验被内查询检索的值是否在外查询的结果集中存在
C. It is used to test whether the values retrieved by the outer query exist in the result set of the inner query.(right)
翻译: 他被用以试验被外查询检索的值是否在内查询的结果集中存在
D. The outer query continues evaluating the result set of the inner query until all the values in the result
翻译: 外查询继续评估内查询的结果集,直到评估完结果中全部的值


举例:
select id, name,salary
from employees
where exists (
               select id
               from employees 
               where id in (1,2,3)'
             )
当内查询select id from employees where id in (1,2,3)搜索不到id为1或者2或者3的记录时,内查询返回false到外查询
当内查询select id from employees where id in (1,2,3)搜索到第一个id为1或者2或者3的记录时,内查询直接弹回true外查询
所以称exists为半查询
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值