OCP-1Z0-051 第133题 子查询的用法

一、原题
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.子查询能检索出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.

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值