24. choose the best answer

In the EMPLOYEES table there are 1000 rows and employees are working in the company for more than 10 years.

Evaluate the following SQL statement:

SQL> UPDATE employees

SET salary = NVL(salary,0) + NVL(comm,0),comm = NVL(comm,0)

WHERE hire_date < SYSDATE - 600;

What would be the result?

A) It gives an error because NVL function cannot be used with UPDATE.

B) It gives an error because multiple NVL functions are used in an expression.

C) It executes successfully and updates the records of those employees who have been working in the company for more than 600 days.

D) It executes successfully but no rows updated.

Answer:C

(SQL> update emp

2 set sal=nvl(sal,0)+nvl(comm,0),comm=nvl(comm,0)

3 where hiredate < sysdate - 100;

已更新 14 行。

)

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

  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题库考试原题及答案解析(23)

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

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

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

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

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

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

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

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

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

随机推荐

  1. 按键精灵对VBS的支持

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

  2. Elasticsearch 2.4.1 Bigdesk 插件安装

    简介: Elasticsearch 2.4.1 安装 bigdesk bigdesk 是一个 ES 集群监控工具,可以检测到集群状态.各节点信息,包括 JVM.Thread Pools.OS.Proc ...

  3. css继承和层叠

    在前面介绍了如何利用文档结构和css选择器为元素应用各种丰富的样式,今天来好好聊聊css的层叠和继承,先说说概念. 继承:一个元素向其后代元素传递属性值所采用的机制,说的通俗点,就是元素的某些属性可以 ...

  4. yii 关于如何改变默认访问的控制器(site)

    以前Yii1学了个皮毛就没去管了,现在想重新捡起来Yii2.0.2却出来了,于是搭建好环境来学习. 安装好Yii2后第一个想到的问题就是修改默认的控制器了. 按照网上所说,终于在/vendor/yii ...

  5. ubuntu账户密码正确但是登录不进去系统

    ubuntu12.04管理员账户登录不了桌面,只能客人会话登录 求助!!ubuntu12.04管理员账户登录不了桌面,只能客人会话登录. ctrl+alt+f1 ,切换到tty1,输入管理员帐号和密码 ...

  6. rsync同步常用命令[转载]

    转载:http://blog.csdn.net/niushuai666/article/details/16880061 如果你是一位运维工程师,你很可能会面对几十台.几百台甚至上千台服务器,除了批量 ...

  7. 自动化ui 保存max场景信息 结构化处理比较好用

    struct gt_cl_hp_saveMaxinfo ( pathpp ="" , fn savemaxinfor =( DialogMonitorOPS.unRegisterN ...

  8. 仅仅 IE8 有效的 CSS hack 写法

    IE8 CSS hack 就是在属性后面加上 \9 或者 \0,代码如下: color:#FFF\0; /* IE8 */ color:#FFF\9; /* 所有IE浏览器(ie6+) */ 上面的 ...

  9. C#使用互斥量(Mutex)实现多进程并发操作时多进程间线程同步操作(进程同步)的简单示例代码及使用方法

    本文主要是实现操作系统级别的多进程间线程同步(进程同步)的示例代码及测试结果.代码经过测试,可供参考,也可直接使用. 承接上一篇博客的业务场景[C#使用读写锁三行代码简单解决多线程并发写入文件时线程同 ...

  10. 支付宝 iOS SDK 官方下载页面[转]

    from:http://blog.sina.com.cn/s/blog_6f72ff900102v0sw.html 藏得太深了,不得不记下来!     官方页面地址:   https://b.alip ...