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

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

  2. ETL 脚本任务

    Public Sub Main()        '        ' Add your code here        '        Dim sbWA As New StringBuilder ...

  3. 基础 ByteBuffer 和 ByteBuf

    缓冲区 ByteBuffer buffer = ByteBuffer.allocate(); ByteBuf https://www.jianshu.com/p/3fbf54b8e8ec

  4. Cloudera Manger CDH 安装文档

    简介: Cloudera Manager 是 Cloudera 公司推出的 Hadoop 集群管理工具,通过该管理工具可以方便的部署.配置.监控集群. Cloudera 公司自己发布的 Hadoop ...

  5. SublimeText Videos Notes

    [SublimeText Videos Notes] Getting Started 1.Hello:https://tutsplus.com/course/improve-workflow-in-s ...

  6. 基于webpack的Vue.js开发环境快速搭建

    1. 安装node node下载地址 2. 安装淘宝 NPM npm 是node.js 的包管理工具. 镜像命令地址 #命令行: npm install -g cnpm 3. 安装vue # 全局安装 ...

  7. 可用于nodejs的SuperAgent(ajax API)

    简单示例: import request from 'superagent';//引用声明 request.post(api) .withCredentials()//跨域 .end((err, re ...

  8. 输入输出参数 inout

    输入输出参数 inout 函数参数默认是常量.试图在函数体中更改参数值将会导致编译错误(compile-time error).这意味着你不能错误地更改参数值.如果你想要一个函数可以修改参数的值,并且 ...

  9. qt学习(三) qt布局

    使用横向与竖向.网格三种布局嵌套使用后可以组合出很复杂的界面. 这里向大家推荐这篇博客 http://www.cnblogs.com/Bonker/p/3454956.html 我这里使用布局做了一个 ...

  10. sqlserver 2017 linux还原windows备份时的路径问题解决

    windows的备份由于路径问题,在Linux上会报错 File 'YourDB_Product' cannot be restored to 'Z:\Microsoft SQL Server\MSS ...