【OCP-12c】CUUG 071题库考试原题及答案解析(23)
23.choose the best answer
View the Exhibits and examine PRODUCTS and SALES tables.
You issue the following query to display product name and the number of times the
product has been sold:
SQL>SELECT p.prod_name, i.item_cnt
FROM (SELECT prod id, COUNT(*) item_cnt
FROM sales GROUP BY prod_id) i RIGHT OUTER JOIN products p
ON i.prod_id = p.prod_id;
What happens when the above statement is executed?
A) The statement executes successfully and produces the required output.
B) The statement produces an error because a subquery in the FROM clause and outer-joins cannot be used together.
C) The statement produces an error because ITEM_CNT cannot be displayed in the outer query.
D) The statement produces an error because the GROUP BY clause cannot be used in a subquery in the FROM clause.
Answer:A
(SQL> select d.dname,e.emp_cnt
from (select deptno,count(*) emp_cnt from emp group by deptno)e right outer join dept d
on e.deptno=d.deptno;
DNAME EMP_CNT
-------------- ----------
ACCOUNTING 2
RESEARCH 4
SALES 6
OPERATIONS
TRAIN)
【OCP-12c】CUUG 071题库考试原题及答案解析(23)的更多相关文章
- 【OCP认证12c题库】CUUG 071题库考试原题及答案(28)
28.choose the best answer Evaluate the following SQL statement: SQL> SELECT promo_id, promo_categ ...
- 【OCP认证12c题库】CUUG 071题库考试原题及答案(27)
27.choose two The SQL statements executed in a user session are as follows: SQL> CREATE TABLE pro ...
- 【OCP认证12c题库】CUUG 071题库考试原题及答案(26)
26.choose two Examine the structure of the PRODUCTS table. Which two statements are true? A) EXPIRY_ ...
- 【OCP认证12c题库】CUUG 071题库考试原题及答案(25)
25. choose the best answer Evaluate the following SQL statement: ALTER TABLE hr.emp SET UNUSED (mgr_ ...
- 【OCP-12c】CUUG 071题库考试原题及答案解析(24)
24. choose the best answer In the EMPLOYEES table there are 1000 rows and employees are working in t ...
- 【OCP-12c】CUUG 071题库考试原题及答案解析(22)
5.choose the best answer Evaluate the following CREATE SEQUENCE statement: CREATE SEQUENCE seq1 STAR ...
- 【OCP-12c】CUUG 071题库考试原题及答案解析(21)
3.choose three View the Exhibit and examine the description of SALES and PROMOTIONS tables. You want ...
- 【OCP-12c】CUUG 071题库考试原题及答案解析(20)
20.choose two Examine the description of the EMP_DETAILS table given below: Which two statements are ...
- 【OCP-12c】CUUG 071题库考试原题及答案解析(19)
1.choose the best answerWhat is the primary difference between the relational database (RDB) andobje ...
随机推荐
- javax.persistence.RollbackException: Error while committing the transaction
the valid jpa update entity code gives the exception below in the case of wrong dependency( org.hib ...
- 【转】mac os、linux及unix之间的关系
mac os.linux及unix之间的关系 unix 是由贝尔实验室开发的多用户.多任务操作系统 linux是一类Unix操作系统的统称,严格来说,linux系统只有内核叫“linux”,而li ...
- 【335】Install PyDev in Eclipse IDE
Reference: Eclipse和PyDev搭建完美Python开发环境(Windows篇) Reference: Install the PyDev plug-in for Eclipse Do ...
- 迷你MVVM框架 avalonjs 1.2发布
avalon1.2 带来了许多新特性,让开发更轻松!详见如下: 升级路由系统与分页组件. 对ms-duplex的绑定值进行增强,以前只能prop或prop.prop2,现在可以prop["x ...
- hadoop之HDFS学习笔记(一)
主要内容:hdfs的整体运行机制,DATANODE存储文件块的观察,hdfs集群的搭建与配置,hdfs命令行客户端常见命令:业务系统中日志生成机制,HDFS的java客户端api基本使用. 1.什么是 ...
- PLSQL result set exceeds the maximum size(100M)if necessary,you can explicitly confinue this query
在PL SQL 里执行一条语句,当反正信息达到2w条时,弹出如下内容:result set exceeds the maximum size(100M)if necessary,you can exp ...
- 9-eclispe中右键BuildPath没有了
Eclipse 右上角的代码视图,选择Java就好了!
- Greeplum 系列(八) 数据维护
Greeplum 系列(八) 数据维护 一.事务管理 begin(start transaction) # 开始事务 savepoint # 保存事务回滚点 rollback # 回滚事务 end(c ...
- vue.js和angular.js的区别
关于Vue的描述: HTML模版+JSON数据,再创建一个Vue实例,就这么简单 关于Angular的描述: AngularJS是为了克服HTML在构建应用上的不足而设计的.HTML是一门很好的为静态 ...
- Linux下的用户权限
用户权限: drwxr-xr-x root root - : boot #权限位 硬连接数 所属用户 所属组 大小 最后修改时间 文件/目录# r w x 4 2 1 用户权限位分为3段,分别对应US ...