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题)的更多相关文章

  1. 【OCP题库-12c】最新CUUG OCP 071考试题库(72题)

    72.View the exhibit for the structure of the STUDENTand FACULTYtables. STUDENT Name Null? Type ----- ...

  2. 【OCP题库-12c】最新CUUG OCP 071考试题库(71题)

    71.(32-18) choose three Which three statements indicate the end of a transaction? (Choose three.) A) ...

  3. 【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 ...

  4. 【OCP题库-12c】最新CUUG OCP 071考试题库(69题)

    69.(31-1)choose the best answer: Evaluate the following query: SELECT INTERVAL '300' MONTH, INTERVAL ...

  5. 【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 ...

  6. 【OCP题库】最新CUUG OCP 12c 071考试题库(67题)

    67.(25-8)choose the best answer: View the Exhibit and examine the structure of CUSTOMERS table. Eval ...

  7. 【OCP题库】最新CUUG OCP 12c 071考试题库(66题)

    66.(22-19)choose two Examine the structure proposed for the TRANSACTIONS table: Which two statements ...

  8. 【OCP题库】最新CUUG OCP 12c 071考试题库(65题)

    65.(22-16) choose the best answer: The CUSTOMERS table has the following structure: You need to writ ...

  9. 【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 ...

  10. 【12c OCP】最新CUUG OCP-071考试题库(51题)

    ------------------------------------------------------- 51.(12-10)choose the best answer: Evaluate t ...

随机推荐

  1. Eclipse去掉对jQuery的错误提示

    1.I have found that I can leave the JavaScript Validator enable and ignore specific files by adding ...

  2. hive中修改序列化格式分隔符

    标签: hadoophivealtertable 2014-11-19 10:45 4219人阅读 评论(0) 收藏 举报  分类: hadoop(6)  版权声明:本文为博主原创文章,未经博主允许不 ...

  3. 03-SSH综合案例:商城表关系分析

    1.2   设计页面: 静态页面: 1.3    数据库分析与设计: 一般是一个Java类就对应一个表,有哪些类?那看你有哪些实体啊?一般一个模块对应一个实体 有用户模块就会有用户的一个实体,就会有用 ...

  4. 23.Merge k Sorted Lists (Array, Queue; Sort)

    Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. 思 ...

  5. transform.rotation和GetComponent<Rigidbody>().MoveRotation

    同时在UPDATE和FIXED UPDATE中调整 旋转 并未出现闪,而是一直以UPDATE中的为准,可认为MoveRotation调用后在UPDATE中生效 using System.Collect ...

  6. for 续10

    ---------siwuxie095                   for 帮助信息:                                                     ...

  7. 解决opacity属性在低版本IE浏览器下失效的方法

    以前,一直都以为ie9以下的版本不支持opacity属性.所以就同时使用 opacity和ie独特的filter蒙版.但是有些时候需要一些动态的效果,就比如层的渐渐消失,隐藏,就需要使用动态变化的op ...

  8. jdeveloper12.1.3的安装与卸载

    jdeveloper12.1.3的安装步骤:1>安装jdk7.0 2>在命令行中输入:cd C:\Program Files\Java\jdk1.7.0_60\bin 3>命令行安装 ...

  9. Laravel 引入自定义类库或第三方类库

    强烈建议引入的类 都是含有命名空间的,这样使用起来就不会出现重名的情况.!!当然,没有命名空间也可以使用,就是类名字(非文件名)最好复杂一些.(重复也不要紧,程序会自己判断) laravel5.4中如 ...

  10. macOS 10.13 安装Virtualbox失败

    macOS 10.13 安装Virtualbox失败 Enviroment macOS: 10.13 High Sierra virtualBox: 5.1.28 Problem descriptio ...