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. docker 基本使用和安装提速

    https://www.cnblogs.com/Erik_Xu/p/6662936.html#redis >yum install -y docker 道客提速 先安装curl >yum ...

  2. AnyConnect removes "Connections" tab from IE Settings solution

    I have an ASA 5510 that we use for SSL VPN Client access.  The ASA distributes the AnyConnect (v2.4. ...

  3. C语言实现 读取写入ini文件实现(转)

    #include <stdio.h> #include <string.h> /* * 函数名: GetIniKeyString * 入口参数: title * 配置文件中一组 ...

  4. Shder中实现TintColor

    [Shder中实现TintColor] TintColor实现上相当于一个滤镜,若TintColor的R为0,则原图的R通道颜色应该为0.基于此,实现TintColor很容易,原图颜色直接乘以Tint ...

  5. Radial Blur

    [Radial Blur] 核心代码如下: v2f vert (appdata_img v) { v2f o; o.pos = mul(UNITY_MATRIX_MVP, v.vertex); o.u ...

  6. 自学jquery,下午实现前后台交互--成为牛逼的女程序员

    希望周末能够把搜索质量对比的页面做出来!!! 牛逼的薰衣草程序员,fighting

  7. MongoServerSettings Members

    The MongoServerSettings type exposes the following members. Constructors   Name Description MongoSer ...

  8. C#通用数据访问类库

    说明:此篇文章是给那些和我一样仍在使用ADO.NET访问数据库的.NET开发人员写的,因为某些原因,比如还在使用.NET3.0以下版本开发.NET应用或者所使用的数据库对ORM支持不是很好,或者是对O ...

  9. Linux System V Semaphore semget多进程同时创建缺陷解决方法

    System V Semaphore的创建过程缺陷是创建与赋初值由两个函数完成,这会导致两个进程同时创建的话会出现竞争和不一致状态,即使是使用了IPC-EXCL标记. 示例: oflag = IPC- ...

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

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