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


    168. View the Exhibit and examine the description of SALES and PROMOTIONS tables.

    You want to delete rows from the SALES table, where the PROMO_NAME column in the PROMOTIONS

    table has either blowout sale or everyday low price as values.

    Which DELETE statements are valid? (Choose all that apply.)

    delete from sales

    where promo_id=(select promo_id from promotions where)

     

    A. DELETE FROM sales
    WHERE promo_id = (SELECT promo_id                  

    FROM promotions                  

    WHERE promo_name = 'blowout sale')

    AND promo_id = (SELECT promo_id                  

    FROM promotions                  

    WHERE promo_name = 'everyday low price');

    B. DELETE FROM sales

    WHERE promo_id = (SELECT promo_id                  

    FROM promotions                  

    WHERE promo_name = 'blowout sale')

    OR promo_id = (SELECT promo_id                  

    FROM promotions                  

    WHERE promo_name = 'everyday low price');

    C. DELETE FROM sales
    WHERE promo_id IN (SELECT promo_id                   

    FROM promotions                   

    WHERE promo_name = 'blowout sale'                   

    OR promo_name = 'everyday low price');

    D. DELETE FROM sales

    WHERE promo_id IN (SELECT promo_id                   

    FROM promotions                   

    WHERE promo_name IN ('blowout sale','everyday low price'));

    Answer: BCD

    答案解析:

    题意要求:从SALES表中删除行,条件为PROMOTIONS表中PROMO_NAM列的值为blowout sale或者everyday low price)

    BCD这三个选项是等价的。

    而A的where条件中的AND不满足题意要求。

  • 相关阅读:
    uni-app之预加载和取消预加载(仅支持APP和H5)——uni.preloadPage、uni.unPreloadPage
    JavaScript 之数组对象(Array)
    【2019csp模拟】文件列表
    【2019csp模拟】两段子序列
    B. 【普转提七联测 Day 6】载重
    C.【普转提七联测 Day 6】分数
    A. 【普转提七联测 Day 6】石头
    struct和class的区别
    TagHelper中获取当前Url
    为什么要使用 Taghelper (标记助手)
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13316834.html
Copyright © 2020-2023  润新知