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. 并发之CAS无锁技术

        CAS算法即是:Compare And Swap,比较并且替换:     CAS算法存在着三个参数,内存值V,旧的预期值A,以及要更新的值B.当且仅当内存值V和预期值B相等的时候,才会将内存值 ...

  2. 裸函数naked解析

    先分享一个案例: #include <stdio.h> __declspec(naked) void Test() { int x; x = ; __asm ret; } int main ...

  3. python爬虫如何POST request payload形式的请求

    python爬虫如何POST request payload形式的请求1. 背景最近在爬取某个站点时,发现在POST数据时,使用的数据格式是request payload,有别于之前常见的 POST数 ...

  4. sqlserver top 赋值

    DECLARE @password2 VARCHAR(30) select top 1 @password2= password from teacher 不要写成 DECLARE @password ...

  5. 解决Springboot集成ActivitiModel提示输入用户名密码的问题

    一.原因分析 先要知道两点 - SpringBoot会根据引入的Jar包而自动配置相应的功能. - ActivitiModeler中引用了Spring Security的Jar.(是一个安全或者说权限 ...

  6. 洛谷 P2899 [USACO08JAN]手机网络Cell Phone Network(树形动规)

    题目描述 Farmer John has decided to give each of his cows a cell phone in hopes to encourage their socia ...

  7. VMWare 虚拟机挂载 Homestead NFS 进行老项目(基于 Brophp)维护

    环境: Laravel/homestead + winnfsd VMWare workstation 背景: 众所周知, windows 上成功配置 Homestead 进行开发时,为了解决文件系统的 ...

  8. nodejs顺序执行shell

    最近工作中需要用到nodejs编写脚本来顺序执行自动化测试用例,编写代码如下: var runCommand = function (command){ child_process.exec(comm ...

  9. C#使用Log4Net记录日志(转)

    出处:http://www.cnblogs.com/wangsaiming/archive/2013/01/11/2856253.html 第一步:下载Log4Net 下载地址:http://logg ...

  10. git ssh创建秘钥

    git是分布式的代码管理工具,远程的代码管理是基于ssh的,所以要使用远程的git则需要ssh的配置. github的ssh配置如下: 一 . 设置git的user name和email: $ git ...