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

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;

)

原文地址:https://blog.51cto.com/13854012/2353298

时间: 2024-10-03 11:39:46

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

【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 table, DEPTNO is the PRIMARY KEY. In the EMP table, EMPNO is the PRIMARY KEY and DEPTNO is the FOREIGN KEY referencing the DEPTNO column in the DEPT t

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

35.choose the best answer View the Exhibit and examine the description of the EMPLOYEES table. Evaluate the following SQL statement: SELECT first_name, employee_id, NEXT_DAY(ADD_MONTHS(hire_date,6),1) "Review" FROM employees; The query was writt

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

34.choose two View the Exhibit and examine the structure of the PRODUCT_INFORMATION and INVENTORIES tables. You have a requirement from the supplies department to give a list containing PRODUCT_ID, SUPPLIER_ID, and QUANTITY_ON_HAND for all the produc

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

33.choose the best answer View the Exhibit and examine the structure of the ORDER_ITEMS table. Examine the following SQL statement: SELECT order_id, product_id, unit_price FROM order_items WHERE unit_price = (SELECT MAX(unit_price) FROM order items G

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

36.choose the best answer View the Exhibits and examine the structures of the PRODUCTS, SALES, and CUSTOMERS tables. You issue the following query: SQL>SELECT p.prod_id,prod_name,prod_list_price, quantity_sold,cust_last_name FROM products p NATURAL J

【2019年8月】OCP 071认证考试最新版本的考试原题-第30题

choose two Evalute these conmands which execate sucestully CREATE SEQUENCE ord_seq INCREMENT BY 1 START WITH 1 MAXVALUE 100000 CYCLE CACHE 5000; Which two statements are true atout the ORD_ITEMS table and the ORD_SEQ sequence? A) Any user inserting r

【第46题】【062题库】2019年OCP认证062考试新题

46题.choose two Examine this command: SQL> ALTER SYSTEM SET ENABLE_DDL_LOGGING=TRUE; Which two statements are true? A) All DDL statements are logged in to a text file in Automatic Diagnostic Repository (ADR) home. B) The Alert Log still contains some

【第53题】【062题库】2019年OCP认证062考试新题

53题.choose two The HR user executes the following query on the EMPLOYEES table but does not issue COMMIT, ROLLBACK, or any data definition language (DDL) command after that: SQL> SELECT job FROM employees WHERE job='CLERK' FOR UPDATE OF empno; HR the

【第60题】【062题库】2019年OCP认证062考试新题

60题.choose one When does a database checkpoint occur? A) When there is an online redo log switch. B) When the SHUTDOWN ABORT command is issued. C) When a user session terminates abnormally. D) When a server process terminates abnorthally. Answer:A (解