当前位置: Oracle DBA培训网-优技培训 >> 071题库 >

【071题库】最新OCP-071考试题库解析-第11题

【071题库】最新OCP-071考试题库解析-第11题

071考试是OCP考试科目的一种,由于071考题多变,我们专门收集整理了最新的考试题库,并对这些考题进行讲解,希望可以帮助广大考生。

每周五晚8点,我们有免费的OCP解析公开课,地址:https://ke.qq.com/course/326223  OCP题库交流群:1015267481,验证ocp

-------------------------------------------------------

071题库-第11题、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):这是一种很少见的连接方式。OracleMySQL 均不支持,其作用

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

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

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

select deptno from dept

minus

select deptno from emp;

)

技术沙龙MORE+

标签错误:<!-- #Label# labelId=20160707140604 moduleId=1 classId=12231768634 orderby=2 fields=url,title,u_info attribute= datatypeId=22192428132 recordCount=3 pageSize= <htmlTemplate><dt><img src="/images/index_26${index}.jpg" width="100" height="62" /><a href="$url" title="${title}">${title}</a><span>${api.left(u_info,60)}</span></dt></htmlTemplate> -->
我要参加技术沙龙