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. boost之date_time库

    最近开了boost库的学习,就先从日期时间库开始吧,boost的date_time库是一个很强大的时间库,用起来还是挺方便的.以下算是我学习的笔记,我把它记录下来,以后便于我复习和查阅. #inclu ...

  2. rsync同步常用命令[转载]

    转载:http://blog.csdn.net/niushuai666/article/details/16880061 如果你是一位运维工程师,你很可能会面对几十台.几百台甚至上千台服务器,除了批量 ...

  3. qt4.8转qt5.4

    1.头文件包含    #include <QtGui/QProgressBar>    #include <QtGui/QProgressDialog>    #include ...

  4. [SoapUI] 如何让gzip和chunked的response显示出来 [设置Accept-Encoding为deflate]

    如果response的Content-Encoding是gzip或者Transfer-Encoding是chunked,在SoapUI里面是无法显示出来的. 解决办法:在Request的Header里 ...

  5. [Jenkins]怎样自定义发出邮件的 From Email Address 和 From Name

    在Jenkins上建了一个执行SoapUI的task,想要自定义发送邮件的地址和姓名,怎么办呢? 在Editable Email Notification里面添加Pre-send Script 脚本如 ...

  6. 懒人的ERP开发框架--2B&苦B程序员专用

    在企业内部的ERP系统开发中,如果使用MS的技术,那么Winform + DevExpress + IIS + WCF +EF 就是懒人的黄金组合了,EF使用数据库优先,一般ERP应用主要关注点在数据 ...

  7. Introduction to Razor Pages in ASP.NET Core

    https://docs.microsoft.com/en-us/aspnet/core/mvc/razor-pages/ 从ASP.NET Core 2.0.0版本之后,添加了新的特性Razor p ...

  8. 引入jQuery

    用于测试和开发(未压缩,是可读的代码)  uncompressed, 用于实际的网站中,已被精简和压缩.  minified   jQuery 1.xjQuery Migrate  过渡版jQuery ...

  9. swift学习之-- UIAlertVIewController - uiactionsheet

    // //  ViewController.swift //  actionsheet // //  Created by su on 15/12/7. //  Copyright © 2015年 t ...

  10. .NET基础 (13)IFormattable和IformatProvider的使用

    IFormattable和IformatProvider的使用1 如何使用IFormattable接口实现格式化输出2 如何告诉类型格式化输出的方式 IFormattable和IformatProvi ...