ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 042-028

042-028

原创 Linux操作系统 作者:jbymy2000 时间:2012-03-16 16:25:58 0 删除 编辑
28. 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.
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
D. The outer query continues evaluating the result set of the inner query
until all the values in the result set are processed.
Answer: AC
SELECT PORT_ID, PORT_NAME
FROM PORTS P1 ---outer query
WHERE EXISTS (SELECT *
FROM SHIPS S1 ---inner query
WHERE P1.PORT_ID = S1.HOME_PORT_ID);
Evaluate:求..值
The EXISTS keyword tests for the existence of any rows in a subquery. If no rows
are found, the answer is FALSE. Otherwise, the subquery returns TRUE. NOT EXISTS
reverses the results.
答案A指的是:当外表的一条数据记录的相关字段与内表的相关联接进行等值联接时, 只要发
现能在内表找到一条记录, 就立即停止与内表的匹配, 也就是EXISTS操作符只是检查是否有
匹配的数据。
答案C指的是:其实就是一种对于exist操作符的一种术语的描述。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11312660/viewspace-718790/,如需转载,请注明出处,否则将追究法律责任。

上一篇: 047-026
下一篇: 047-029
请登录后发表评论 登录
全部评论

注册时间:2012-01-10

  • 博文量
    416
  • 访问量
    202943