代码改变世界

12c OCP考试专项 [1z0-071]-Q6: implicit convertion 隐式转换(2020.06.16)

2020-06-16 12:39  askscuti  阅读(291)  评论(0编辑  收藏  举报

Which two statements will do an implicit conversion?

A. SELECT * FROM customers WHERE customer_id = 0001;
B. SELECT * FROM customers WHERE insert_date = Date '2019-01-01';
C. SELECT * FROM customers WHERE to_char(customer_id) = '0001';
D. SELECT * FROM customers WHERE customer_id = '0001';
E. SELECT * FROM customers WHERE insert_date = '01-JAN-19';

Answer: DE

Explanation:

D:customer_id 字段类型为 数值,引号为字符串,customer_id='0001',字符串隐式转换为数字;
E:insert_date 字段类型为 日期,引号为字符串,insert_date='01-JAN-19' 字符串隐式转换为日期;

提示:答案为个人理解和解答,难免有错,也欢迎大家及时指正。