16、(7-5) choose the best answer
The PRODUCTS table has the following structure:
Evaluate the following two SQL statements:
SQL>SELECT prod_id, NVL2(prod_expiry_date, prod_expiry_date + 15,'')
FROM products;
SQL>SELECT prod_id, NVL(prod_expiry_date, prod_expiry_date + 15)
FROM products;
Which statement is true regarding the outcome?
A) Both the statements execute and give different results.
B) Both the statements execute and give the same result.
C) Only the second SQL statement executes successfully.
D) Only the first SQL statement executes successfully.
Answer:A
(解析:NVL2 的意思是如果第一个表达式不为空,则返回第二表达式的值,否则返回第三表达式
SQL> select sal,comm,nvl2(comm,comm+10,0) from emp;
SAL COMM NVL2(COMM,COMM+10,0)
---------- ---------- --------------------
800 0
1600 300 310
1250 500 510
2975 0

【OCP-12c】CUUG 071题库考试原题及答案解析(16)的更多相关文章

  1. 【OCP认证12c题库】CUUG 071题库考试原题及答案(28)

    28.choose the best answer Evaluate the following SQL statement: SQL> SELECT promo_id, promo_categ ...

  2. 【OCP认证12c题库】CUUG 071题库考试原题及答案(27)

    27.choose two The SQL statements executed in a user session are as follows: SQL> CREATE TABLE pro ...

  3. 【OCP认证12c题库】CUUG 071题库考试原题及答案(26)

    26.choose two Examine the structure of the PRODUCTS table. Which two statements are true? A) EXPIRY_ ...

  4. 【OCP认证12c题库】CUUG 071题库考试原题及答案(25)

    25. choose the best answer Evaluate the following SQL statement: ALTER TABLE hr.emp SET UNUSED (mgr_ ...

  5. 【OCP-12c】CUUG 071题库考试原题及答案解析(24)

    24. choose the best answer In the EMPLOYEES table there are 1000 rows and employees are working in t ...

  6. 【OCP-12c】CUUG 071题库考试原题及答案解析(23)

    23.choose the best answer View the Exhibits and examine PRODUCTS and SALES tables. You issue the fol ...

  7. 【OCP-12c】CUUG 071题库考试原题及答案解析(22)

    5.choose the best answer Evaluate the following CREATE SEQUENCE statement: CREATE SEQUENCE seq1 STAR ...

  8. 【OCP-12c】CUUG 071题库考试原题及答案解析(21)

    3.choose three View the Exhibit and examine the description of SALES and PROMOTIONS tables. You want ...

  9. 【OCP-12c】CUUG 071题库考试原题及答案解析(20)

    20.choose two Examine the description of the EMP_DETAILS table given below: Which two statements are ...

  10. 【OCP-12c】CUUG 071题库考试原题及答案解析(19)

    1.choose the best answerWhat is the primary difference between the relational database (RDB) andobje ...

随机推荐

  1. FoxPro 游标指针操作

    查询上一记录skip -1 *相对定位 指针向上移动一条记录if bof() *测试当前记录指针是否超出第一条记录  go top *绝对定位表的第一条记录endifthisform.refresh ...

  2. Graphics.BlitMultiTap解析

    [Graphics.BlitMultiTap解析] 上述代码的四个偏移,表示利用此4个偏移,生成4张纹理单位.下面每一个SetTexture,默认会调用一个纹理单位. 而在Shader中,Unity会 ...

  3. pg_hba.conf、pool_hba.conf 以及 pool_passwd 三者间的关系

    pg_hba.conf.pool_hba.conf 以及 pool_passwd 三者间的关系: 1.pg_hba.conf.pool_hba.conf 以及 pool_passwd 三者关系 pg_ ...

  4. spring集成mybatis配置多个数据源,通过aop自动切换

    spring集成mybatis,配置多个数据源并自动切换. spring-mybatis.xml如下: <?xml version="1.0" encoding=" ...

  5. 文件打包代码更新 使用json记录打包文件信息

    经过之前的几次试验 决定使用json记录打包文件信息 #include "Package.h" #include "json/json.h" #include ...

  6. TOGAF架构培训材料学习总结

        作于一个架构师尤其是企业架构师来说,丰富的理论知识可以帮助他在架构规划及管理过程中站在更高的角度去看待问题,历史发展原因有很多已成体系的架构理论,TOGAF是近年来比较接地气的,受到了政府和银 ...

  7. Oracle GoldenGate 四、数据过滤和数据项匹配

    写在开始前 从两周前我花了大量的业余时间阅读GoldenGate官方文档,并根据文档实践和进一步学习了解GoldenGate,以下便是根据官方文档理解总结的GoldenGate学习内容: Oracle ...

  8. swoole1.8.0+版本异步redis安装(本实例为swoole1.8.10版本)详解

    Swoole-1.8.0+版本增加了对异步Redis客户端的支持,基于redis官方提供的hiredis库实现.Swoole提供了__call魔术方法,来映射绝大部分Redis指令(本次安装实例为sw ...

  9. 安装一个Redis

    1. 官网 http://redis.io/ 2.下载 官方不提供windows版本,但https://github.com/MSOpenTech/redis 可以从这里获取64位. 3.

  10. PHP(五)session和文件上传初步