• OCP-1Z0-051-V9.02-56题


    56. View the Exhibit and examine the structure of the PROMOTIONS table. 
    Using the PROMOTIONS table,  you need to find out the names and cost of all the promos done on 'TV'
    and 'internet' that ended in the time interval 15th March '00 to 15th October '00.
    Which two queries would give the required result?   (Choose two.) 
     
    A. SELECT promo_name,  promo_cost     
    FROM promotions     
    WHERE  promo_category IN ('TV', 'internet') AND           
    promo_end_date BETWEEN '15-MAR-00' AND '15-OCT-00';
    B. SELECT promo_name,  promo_cost    
    FROM promotions    
    WHERE  promo_category = 'TV' OR promo_category ='internet' AND       
    promo_end_date >='15-MAR-00' OR promo_end_date <='15-OCT-00';
    C. SELECT promo_name,  promo_cost     
    FROM promotions     
    WHERE   (promo_category BETWEEN 'TV' AND 'internet') AND         
    (promo_end_date IN ('15-MAR-00','15-OCT-00'));
    D. SELECT promo_name,  promo_cost    
    FROM promotions    
    WHERE  (promo_category = 'TV' OR promo_category ='internet') AND
      (promo_end_date >='15-MAR-00' AND promo_end_date <='15-OCT-00');
     
    Answer: AD
    答案解析:
    题意要求done on 'TV'and 'internet' that ended in the time interval 15th March '00 to 15th October '00.
    B错误,promo_end_date >='15-MAR-00' OR promo_end_date <='15-OCT-00' 应使用AND
    C错误,promo_category BETWEEN 'TV' AND 'internet',条件不满足。
  • 相关阅读:
    linux基础学习-6.4-Linux无法上网排查流程
    [JSOI2007][BZOJ1029] 建筑抢修
    [HNOI2003][BZOJ1216] 操作系统
    [Apio2009][BZOJ1179] Atm
    [Tjoi2013][BZOJ3172] 单词
    AC自动机学习笔记
    [转]一个比较通俗的KMP算法讲解
    [HAOI2008][BZOJ1042] 硬币购物
    [NOI2007][BZOJ1491] 社交网络
    [SCOI2009][BZOJ1295] 最长距离
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13316914.html
Copyright © 2020-2023  润新知