30.choose the best answer

Examine the commands used to create DEPARTMENT_DETAILS and COURSE_DETAILS:

SQL> CREATE TABLE DEPARTMENT_DETAILS

(DEPARTMENT_ID NUMBER PRIMARY KEY,

DEPARTMENT_NAME VARCHAR2(50) ,

HOD VARCHAR2(50));

SQL> CREATE TABLE COURSE_DETAILS

(COURSE_ID NUMBER PRIMARY KEY,

COURSE_NAME VARCHAR2 (50) ,

DEPARTMENT_ID NUMBER REFERENCES DEPARTMENT_DETAILS(DEPARTMENT_ID));

You want to generate a list of all department IDs that do not exist in the

COURSE_DETAILS table.

You execute the SQL statement:

SQL> SELECT d.department_id FROM course_details c INNER JOIN department_details d

ON c.department_id<>d.department_id;

What is the outcome?

A) It fails because the ON clause condition is not valid.

B) It executes successfully and displays the required list.

C) It executes successfully but displays an incorrect list.

D) It fails because the join type used is incorrect.

Answer:C

(如果条件中用<>,得从来的结果就是笛卡尔积,inner join 并不以谁为基础,它只显示符

合条件的记录

联合连接(UNION JOIN):这是一种很少见的连接方式。Oracle、MySQL 均不支持,其作用

是:找出全外连接和内连接之间差异的所有行。这在数据分析中排错中比较常用。也可以利

用数据库的集合操作来实现此功能。

ORACLE 中可以用 minus 等同联合连接的功能。

select deptno from dept

minus

select deptno from emp;

)

【Oracle 12c】CUUG OCP认证071考试原题解析(30)的更多相关文章

  1. 【Oracle 12c】CUUG OCP认证071考试原题解析(35)

    35.choose the best answer View the Exhibit and examine the description of the EMPLOYEES table. Evalu ...

  2. 【Oracle 12c】CUUG OCP认证071考试原题解析(32)

    32.choose the best answer View the Exhibit and examine the data in EMP and DEPT tables. In the DEPT ...

  3. 【Oracle 12c】CUUG OCP认证071考试原题解析(31)

    31.choose the best answer Which statement is true regarding the USING clause in table joins? A) It c ...

  4. 【Oracle 12c】CUUG OCP认证071考试原题解析(29)

    29.choose the best answer Evaluate the following query: SQL> SELECT promo_name || q'{'s start dat ...

  5. 【12c OCP】CUUG OCP认证071考试原题解析(36)

    36.choose the best answer View the Exhibits and examine the structures of the PRODUCTS, SALES, and C ...

  6. 【12c OCP】CUUG OCP认证071考试原题解析(34)

    34.choose two View the Exhibit and examine the structure of the PRODUCT_INFORMATION and INVENTORIES ...

  7. 【12c OCP】CUUG OCP认证071考试原题解析(33)

    33.choose the best answer View the Exhibit and examine the structure of the ORDER_ITEMS table. Exami ...

  8. 【OCP认证12c题库】CUUG 071题库考试原题及答案(28)

    28.choose the best answer Evaluate the following SQL statement: SQL> SELECT promo_id, promo_categ ...

  9. 【OCP认证12c题库】CUUG 071题库考试原题及答案(27)

    27.choose two The SQL statements executed in a user session are as follows: SQL> CREATE TABLE pro ...

随机推荐

  1. escape(), encodeURL(), encodeURIComponent()

    escape() 方法: 采用ISO Latin字符集对指定的字符串进行编码.所有的空格符.标点符号.特殊字符以及其他非ASCII字符都将被转化成%xx格式的字符编码(xx等于该字符在字符集表里面的编 ...

  2. ScheduledThreadPoolExecutor 线程池调度 使用

    package other; import java.util.concurrent.Callable; import java.util.concurrent.Executors; import j ...

  3. 编程语言分类和Python解释器介绍

    主要内容: 一.编程语言分类和介绍 二.Python解释器分类和介绍 一.编程语言分类和介绍 1.编程语言分类 编程语言的发展依次经历了机器语言.汇编语言和高级语言. 2.编程语言的介绍   2.1 ...

  4. node.js中实现同步操作的3种实现方法

    这篇文章主要介绍了node.js中实现同步操作的3种实现方法,本文用实例讲解一些需要同步操作的情况下,如何编程实现,需要的朋友可以参考下 众所周知,异步是得天独厚的特点和优势,但同时在程序中同步的需求 ...

  5. javascript数组操作(创建、元素删除、数组的拷贝)

    这篇文章主要介绍了javascript数组操作,包括创建.元素的访问.元素删除.数组的拷贝等操作,还有其它示例,需要的朋友可以参考下 1.数组的创建 复制代码 代码如下: var arrayObj = ...

  6. 【bzoj1096】仓库建设 斜率优化dp

    AC通道:http://www.lydsy.com/JudgeOnline/problem.php?id=1096 [题解] 设输入的三个数组为a,b,c sumb维护b数组的前缀和,sumab维护a ...

  7. TouchEvent里的targetTouches、touches、changedTouches的区别的具体体现是?

    touches:当前屏幕上所有触摸点的集合列表 targetTouches: 绑定事件的那个结点上的触摸点的集合列表 changedTouches: 触发事件时改变的触摸点的集合 举例来说,比如div ...

  8. 323. Number of Connected Components in an Undirected Graph按照线段添加的并查集

    [抄题]: Given n nodes labeled from 0 to n - 1 and a list of undirected edges (each edge is a pair of n ...

  9. jquery破坏链

  10. live kalilinux能保存文件和设置

    win32diskimager写入kalilinux镜像,建议用parrot sec os gparted /dev/sdb,新建分区sdb3,Lable输入persistence 挂载/dev/sd ...