Chinaunix首页 | 论坛 | 博客
  • 博客访问: 667670
  • 博文数量: 487
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 4936
  • 用 户 组: 普通用户
  • 注册时间: 2018-07-05 13:59
个人简介

ocp考试资料群:569933648 验证码:ocp OCP 12c 19c考试题库解析与资料群:钉钉群号:35277291

文章分类

全部博文(487)

文章存档

2024年(2)

2023年(37)

2021年(151)

2020年(37)

2019年(222)

2018年(38)

我的朋友

分类: Oracle

2019-02-20 17:27:37

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 行。


)
阅读(876) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~