一、原题
二、题目翻译
三、题目解析
Which two statements are true regarding subqueries? (Choose two.)
A. A subquery can retrieve zero or more rows.
B. Only two subqueries can be placed at one level.
C. A subquery can be used only in SQL query statements.
D. A subquery can appear on either side of a comparison operator.
E. There is no limit on the number of subquery levels in the WHERE clause of a SELECT statement.
答案:AD
A. A subquery can retrieve zero or more rows.
B. Only two subqueries can be placed at one level.
C. A subquery can be used only in SQL query statements.
D. A subquery can appear on either side of a comparison operator.
E. There is no limit on the number of subquery levels in the WHERE clause of a SELECT statement.
答案:AD
二、题目翻译
关于子查询哪两句话是正确的?
A.子查询能检索出0行或多行。
B.只能有两个子查询被放在同一层。
C.子查询只能在SQL查询语句中使用。
D.子查询可以出现在比较运算符的任何一边。
E.在SELECT语句中的WHERE子句里不限制子查询的数量层级。
A.子查询能检索出0行或多行。
B.只能有两个子查询被放在同一层。
C.子查询只能在SQL查询语句中使用。
D.子查询可以出现在比较运算符的任何一边。
E.在SELECT语句中的WHERE子句里不限制子查询的数量层级。
三、题目解析
A选项正确。
B选项不正确,同一层可以放多个子查询。
C选项不正确,INSERT、UPDATE、DELETE、SELECT、CREATE TABLE等这些语句中都可以使用子查询。
D选项正确。
E选项不正确,WHERE子句中的嵌套子查询最多能嵌套255层。
联机文档中有详细说明:
http://docs.oracle.com/cd/E11882_01/server.112/e41084/queries007.htm#SQLRF52357
摘录如下:
A subquery can contain another subquery. Oracle Database imposes no limit on the number of subquery levels in the FROM clause of the top-level query. You can nest up to 255 levels of subqueries in the WHERE clause.
B选项不正确,同一层可以放多个子查询。
C选项不正确,INSERT、UPDATE、DELETE、SELECT、CREATE TABLE等这些语句中都可以使用子查询。
D选项正确。
E选项不正确,WHERE子句中的嵌套子查询最多能嵌套255层。
联机文档中有详细说明:
http://docs.oracle.com/cd/E11882_01/server.112/e41084/queries007.htm#SQLRF52357
摘录如下:
A subquery can contain another subquery. Oracle Database imposes no limit on the number of subquery levels in the FROM clause of the top-level query. You can nest up to 255 levels of subqueries in the WHERE clause.