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. Windows 2008配置iis+Php+Mysql

    windows 2008 与 windows 2003 区别在于前者是iis7,后者是iis6.两个系统下配置Iis+Php+Mysql+Zend Optimizer+GD库+Phpmyadmin基本 ...

  2. 按键精灵对VBS的支持

    VBSBegin…VBSEnd(VBS块)格式:VBSBegin...VBSEnd用途:可以在VBS块的区域内随意的书写VBS语法指令. 更多说明:由于彻底的转向VBS语言,会导致goto语句不能被兼 ...

  3. sass对象的定义

    sass在3.3引入map类型,它与JS的对象非常相似,它有两种定义模式.外面都是用小括号括括起来,每个键值对可以像JS那样与逗号分开.不同之后是,键名与键值之间的冒号不是 必须的 不用对象的情况 @ ...

  4. sdm 使用阿里云域名申请 Let’s Encrypt 通配符 域名证书

    安装acme 进入 套件中心 点击安装 Git Server 之后进入SSh会使用git命令 方法1--------------------------------------- 获取代码 git c ...

  5. Linux进程之Fork函数

    Fork()函数 1.所需头文件: #include <unistd.h> #include<sys/types.h> 2.函数定义 pid_t fork( void ); p ...

  6. Marshal.FreeHGlobal 方法 (IntPtr)

    释放以前从进程的非托管内存中分配的内存. 命名空间:   System.Runtime.InteropServices程序集:  mscorlib(位于 mscorlib.dll) 下面的示例演示如何 ...

  7. FineUI学习

    1.无限级菜单绑定 using (DataTable dt = SqlPagerHelper.GetTableByCondition(DefaultConnection.ConnectionStrin ...

  8. 解决 Windows 系统使用 Homestead 运行 Laravel 本地项目响应缓慢问题

    laravel-china.com: https://laravel-china.org/articles/9009/solve-the-slow-response-problem-of-window ...

  9. Error generating final archive: Unable to get debug signature key

    在调试程序时,发生下面的错误: Error generating final archive: Unable to get debug signature key 解决办法: 删除下面的文件: C:\ ...

  10. 是什么优化让 .NET Core 性能飙升?(转)

    欢迎大家持续关注葡萄城控件技术团队博客,更多更好的原创文章尽在这里~~ .NET Core(开放源代码,跨平台,x-copy可部署等)有许多令人兴奋的方面,其中最值得称赞的就是其性能了. 感谢所有社区 ...