OCP 1Z0 051 163
来源:互联网 发布:验证域名所有权的方法 编辑:程序博客网 时间:2024/05/21 17:47
163. View the Exhibit and examine the description for the CUSTOMERS table.
You want to update the CUST_CREDIT_LIMIT column to NULL for all the customers, where
CUST_INCOME_LEVEL has NULL in the CUSTOMERS table. Which SQL statement will accomplish the
task?
A. UPDATE customers
SET cust_credit_limit = NULL
WHERE CUST_INCOME_LEVEL = NULL;
B. UPDATE customers
SET cust_credit_limit = NULL
WHERE cust_income_level IS NULL;
C. UPDATE customers
SET cust_credit_limit = TO_NUMBER(NULL)
WHERE cust_income_level = TO_NUMBER(NULL);
D. UPDATE customers
SET cust_credit_limit = TO_NUMBER(' ',9999)
WHERE cust_income_level IS NULL;
现oracle中空字符串的值是NULL,但空格不是。D中的就是空格。
NULL 值不能用等号 大于 小于 比较,只能用 IS NULL、IS NOT NULL。
to_number(null)结果仍然是NULL
Answer: B
You want to update the CUST_CREDIT_LIMIT column to NULL for all the customers, where
CUST_INCOME_LEVEL has NULL in the CUSTOMERS table. Which SQL statement will accomplish the
task?
A. UPDATE customers
SET cust_credit_limit = NULL
WHERE CUST_INCOME_LEVEL = NULL;
B. UPDATE customers
SET cust_credit_limit = NULL
WHERE cust_income_level IS NULL;
C. UPDATE customers
SET cust_credit_limit = TO_NUMBER(NULL)
WHERE cust_income_level = TO_NUMBER(NULL);
D. UPDATE customers
SET cust_credit_limit = TO_NUMBER(' ',9999)
WHERE cust_income_level IS NULL;
现oracle中空字符串的值是NULL,但空格不是。D中的就是空格。
NULL 值不能用等号 大于 小于 比较,只能用 IS NULL、IS NOT NULL。
TEST >select count(*),count(comm) from emp; COUNT(*) COUNT(COMM)---------- ----------- 14 41 row selected.TEST >select * from emp where comm > null;no rows selectedTEST >select * from emp where comm < null;no rows selectedElapsed: 00:00:00.01TEST >select * from emp where comm = null;no rows selectedTEST >select empno,comm from emp where comm is not null; EMPNO COMM---------- ---------- 7499 300 7521 500 7654 1400 7844 04 rows selected.
to_number(null)结果仍然是NULL
TEST >set null NULLTEST >select to_number(null) from dual;TO_NUMBER(NULL)---------------NULL1 row selected.
Answer: B
0 0
- OCP 1Z0 051 163
- OCP 1Z0 051 1
- OCP 1Z0 052 163
- OCP 1Z0 053 163
- OCP 1Z0 051 2
- OCP 1Z0 051 3
- OCP 1Z0 051 4
- OCP 1Z0 051 5
- OCP 1Z0 051 6
- OCP 1Z0 051 7
- OCP 1Z0 051 8
- OCP 1Z0 051 9
- OCP 1Z0 051 10
- OCP 1Z0 051 11
- OCP 1Z0 051 12
- OCP 1Z0 051 13
- OCP 1Z0 051 14
- OCP 1Z0 051 15
- myeclipse解决JSP文件中script背景颜色的调整
- 我知道眼泪多余,笑变得好不容易
- Java调用命令行/启动notepad
- 【职场一些事】震撼职场的十一个寓言故事
- 【Unity 3D】学习笔记一:Label控件(标签控件)
- OCP 1Z0 051 163
- java文件中:sql语句中加参数:
- MyEclipse导入主题文件epf后xml及jsp等页面中点击标签之后显示灰白
- 跑数速度慢,修改参数
- poj 1328 Radar Installation
- 微信公众平台之CURL应用
- C++面试出现频率最高的30道题目(二)
- monkeyrunner内置uiautomator出错的原因
- 设计模式学习笔记