OCP 11g题库详解:1Z0-051-053题
最新学讯:近期OCP认证正在报名中,因考试人员较多请尽快报名获取最近考试时间,报名费用请联系在线老师,甲骨文官方认证,报名从速!
我要咨询OCP 11g题库详解:1Z0-051-053题,完整题库请点击这里联系老师咨询了解
53. View the Exhibit and examine the data in the PROMOTIONS table.
PROMO_BEGIN_DATE is stored in the default date format, dd-mon-rr.
You need to produce a report that provides the name, cost, and start date of all promos in the POST
category that were launched before January 1, 2000.
Which SQL statement would you use?
A. SELECT promo_name, promo_cost, promo_begin_date
FROM promotions
WHERE promo_category = 'post' AND promo_begin_date < '01-01-00';
B. SELECT promo_name, promo_cost, promo_begin_date
FROM promotions
WHERE promo_cost LIKE 'post%' AND promo_begin_date < '01-01-2000';
C. SELECT promo_name, promo_cost, promo_begin_date
FROM promotions
WHERE promo_category LIKE 'P%' AND promo_begin_date < '1-JANUARY-00';
D. SELECT promo_name, promo_cost, promo_begin_date
FROM promotions
WHERE promo_category LIKE '%post%' AND promo_begin_date < '1-JAN-00';
Answer: D
试题解析:
在表达式中,Oracle Server 可以自动执行以下转换:
从 VARCHAR2 或CHAR隐式转换为NUMBER
从VARCHAR2 或CHAR隐式转换为DATE,但必须符合日期的规定的格式。
Oracle Server 可以在表达式中自动执行数据类型转换。例如,表达式hire_date > '01-JAN-90' 将导致字符串'01-JAN-90' 隐式转换为一个日期。因此,表达式中的VARCHAR2 或CHAR 值可以隐式转换为数字或日期数据类型。