美文网首页
Which two statements are true re

Which two statements are true re

作者: 无栈程序员 | 来源:发表于2019-02-06 12:48 被阅读0次

    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为半查询

    相关文章

      网友评论

          本文标题:Which two statements are true re

          本文链接:https://www.haomeiwen.com/subject/kczbsqtx.html