【ocp-12c】最新CUUG OCP-071考试题库(48题)
48、(10-12)choose the best answer
View the Exhibit and examine the description for the PRODUCTS and SALES table.

PROD_ID is a primary key in the PRODUCTS table and foreign key in the SALES table with ON DELETE CASCADE option. The SALES table contains data for the last three years. You want to remove all the rows from the PRODUCTS table for which no sale was done for the last three years.
Which is the valid DELETE statement?
A) DELETE
FROM products
WHERE prod id IN (SELECT prod_id
FROM sales
where time_id >= SYSDATE - 3*365 );
B) DELETE
FROM products
WHERE prod_id = (SELECT prod_id
FROM sales
WHERE time_id - 3*365 = SYSDATE );
C) DELETE
FROM products
WHERE prod_id = (SELECT prod_id
FROM sales
WHERE SYSDATE >= time_id - 3*365 );
D) DELETE
FROM products
WHERE prod_id IN (SELECT prod_id
FROM sales
where SYSDATE - 3*365 >= time_id);
Answer:A
(解析:time_id >= SYSDATE - 3*365 最近三年的时间
SYSDATE - 3*365 >= time_id 三年以前的时间
原来 051 的题
)
【ocp-12c】最新CUUG OCP-071考试题库(48题)的更多相关文章
- 【OCP题库-12c】最新CUUG OCP 071考试题库(72题)
72.View the exhibit for the structure of the STUDENTand FACULTYtables. STUDENT Name Null? Type ----- ...
- 【OCP题库-12c】最新CUUG OCP 071考试题库(71题)
71.(32-18) choose three Which three statements indicate the end of a transaction? (Choose three.) A) ...
- 【OCP题库-12c】最新CUUG OCP 071考试题库(70题)
70.(31-2)choose the best answer: View the Exhibit and examine the structure of the Book table. The B ...
- 【OCP题库-12c】最新CUUG OCP 071考试题库(69题)
69.(31-1)choose the best answer: Evaluate the following query: SELECT INTERVAL '300' MONTH, INTERVAL ...
- 【OCP题库】最新CUUG OCP 12c 071考试题库(68题)
68.(29-13)choose two: Which two statements are true? (Choose two.) A) DICTIONARY is a view that cont ...
- 【OCP题库】最新CUUG OCP 12c 071考试题库(67题)
67.(25-8)choose the best answer: View the Exhibit and examine the structure of CUSTOMERS table. Eval ...
- 【OCP题库】最新CUUG OCP 12c 071考试题库(66题)
66.(22-19)choose two Examine the structure proposed for the TRANSACTIONS table: Which two statements ...
- 【OCP题库】最新CUUG OCP 12c 071考试题库(65题)
65.(22-16) choose the best answer: The CUSTOMERS table has the following structure: You need to writ ...
- 【12c OCP】最新CUUG OCP-071考试题库(52题)
52.(12-11) choose the best answer: Examine the structure and data in the PRICE_LIST table: You plan ...
- 【12c OCP】最新CUUG OCP-071考试题库(51题)
------------------------------------------------------- 51.(12-10)choose the best answer: Evaluate t ...
随机推荐
- 15 并发编程-(IO模型)
一.IO模型介绍 1.阻塞与非阻塞指的是程序的两种运行状态 阻塞:遇到IO就发生阻塞,程序一旦遇到阻塞操作就会停在原地,并且立刻释放CPU资源 非阻塞(就绪态或运行态):没有遇到IO操作,或者通过某种 ...
- 生产者消费者模式做一个golang的定时器
在主程序启动的时候开一个goroutine作为消费者,用管道连接生产者和消费者,消费者处于无限循环,从管道中获取channel传过来定时event 注意:channel在消费者创建的时候就连通生产者和 ...
- 【hdu4347】The Closest M Points 【KD树模板】
题意 一个k维空间,给出n个点的坐标,给出t个询问,每个询问给出一个点的坐标和一个m.对于每个询问找出跟这个点最接近的m个点 分析 kd树的模板题. #include <cstdio> # ...
- 关于调试php的socket服务端中遇到的问题及解决办法
今天终于把socket的服务端解决了,期间遇到了很多问题呢~ 1.用cmd运行php的问题: 2.socket_create()函数未定义问题: 3.查看端口的问题. 以下逐一说说解决办法: 1.在c ...
- VMTurbo采用红帽企业虚拟化软件
VMTurbo公司正处于虚拟化的开始阶段,并将继续向虚拟世界迈进.该公司已宣布官方支持Red Hat 公司的Enterprise Virtualization 3.1.VMTurbo公司采用Red H ...
- Linux System V Semaphore semget多进程同时创建缺陷解决方法
System V Semaphore的创建过程缺陷是创建与赋初值由两个函数完成,这会导致两个进程同时创建的话会出现竞争和不一致状态,即使是使用了IPC-EXCL标记. 示例: oflag = IPC- ...
- MyBatis 实用篇(一)入门
MyBatis 实用篇(一)入门 MyBatis(http://www.mybatis.org/mybatis-3/zh/index.html) 是一款优秀的持久层框架,它支持定制化 SQL.存储过程 ...
- ie8开发人员工具无法使用,按f12任务栏里出现任务,但是窗体不弹出
楼主解决了么,刚出现你这样的问题,找了N久,终于解决了,他娘的,偏方啊任务栏不是出现那个箭头么,点击后没反应是吧在缩略图上点右键-最大化,然后就出来了,ctrl+p反正是可以出来调试模式 神人哪,IE ...
- 获取weibo用户所有的关注列表
1.新浪微博Python SDK笔记——获取粉丝列表或关注列表 http://www.tuicool.com/articles/VnQ3ye 2.friendships/friends关注列表 fri ...
- 深入浅出CSS:Div(一)
这个系列是学习笔记,简明记录结论性的知识. 新建一个层时,border为零,margin为0,padding为0,如果不指定宽度(width),则自动100%填充父元素. 三.层与父元素的关系 1. ...