ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 047-013

047-013

原创 Linux操作系统 作者:jbymy2000 时间:2012-03-16 15:54:27 0 删除 编辑
13. Which two statements are true regarding the execution of the correlated
subqueries? (Choose two.)
A. The nested query executes after the outer query returns the row.
B. The nested query executes first and then the outer query executes.
C. The outer query executes only once for the result returned by the inner
query.
D. Each row returned by the outer query is evaluated for the results returned
by the inner query.
Answer:AD
Evaluate:求..值 execution:执行 correlate:相关的
The nested SELECT statement is called an “inner query” or an “inner
SELECT.” The main query is called “outer SELECT” or “outer query.”
select (select t2.name from t2 where t2.did=t1.did) from t1
()里面的select t2.name from t2 where t2.did=t1.did就是inner query
而()外面的select (select t2.name from t2 where t2.did=t1.did) from t1 就
属于outer query
子查询语法:
SELECT select_list
FROM table
WHERE expr operator
(SELECT select_list
FROM table);
1.子查询(内查询) 在主查询之前执行一次
2.子查询的结果被用于主查询(外查询)
首先执行子查询 (内查询) 显示子查询返回的值,然后用内查询返回的结果执行外
查询,最后,执行整个查询 (包括子查询),显示相同的结果。
怎么跟上面的题目结果刚好相反呢?

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

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

注册时间:2012-01-10

  • 博文量
    416
  • 访问量
    203284