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. 下拉菜单的实现classList.add() classList.remove() class属性的添加和删除

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  2. Spring Boot实践——Spring AOP实现之动态代理

    Spring AOP 介绍 AOP的介绍可以查看 Spring Boot实践——AOP实现 与AspectJ的静态代理不同,Spring AOP使用的动态代理,所谓的动态代理就是说AOP框架不会去修改 ...

  3. 12 MySQL--内置功能介绍

    mysql内置功能: 1.视图 2.触发器 3.存储过程 4.事务 5.函数 6.函数流程控制 一.视图 介绍: 视图是一个虚拟表(非真实存在),其本质是[根据SQL语句获取动态的数据集,并为其命名] ...

  4. 使用 phpStorm 开发

    苦恼蛋疼的曾哥工作室,让人痛不欲生,缓慢的同步速度,另人恼火的插件配置,让人疯狂的卡.简直是让人用了几天之后就不行了. 废话不多说,一款很好的php IDE. 1. phpStorm 下载 here ...

  5. python portia

    docker run -i -t --rm -v <PROJECTS_FOLDER>:/app/data/projects:rw -p 9001:9001 scrapinghub/port ...

  6. Linux-CentOS 更新Firefox版本

    1.用你本地的旧版 firefox,访问http://www.firefox.com.cn,下载Linux版本的Firefox. 2.进入存放下载文件(Firefox-latest-x86_64.ta ...

  7. redis在Web中的使用

    redis是一个键值对数据库,用于缓存数据. redis是一个key-value存储系统.和Memcached数据库类似,它支持存储的value类型相对更多,包括string(字符串).list(链表 ...

  8. 【HDU5992】Finding Hotels 【KD树】

    题意 给出n个酒店的坐标和价格,然后m个查询,每个查询给出一个人的坐标和能承受的最大价格,然后找出在他价格承受范围以内,距离他最近的宾馆,如果有多个,那么输出第一个 分析 kd树的模板题 #inclu ...

  9. [leetcode]273. Integer to English Words 整数转英文单词

    Convert a non-negative integer to its english words representation. Given input is guaranteed to be ...

  10. Jenkins使用FTP进行一键部署及回滚2(Windows)(项目实践)

     转载:http://www.cnblogs.com/EasonJim/p/6295372.html Jenkins使用FTP进行一键部署及回滚2(Windows)(项目实践) 前提: 这一篇是继上一 ...