分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.csdn.net/jiangjunshow
也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!
86. Examine the structure and data of the CUST_TRANS table:
CUST_TRANS
Name Null Type
CUSTNO NOT NULL CHAR(2)
TRANSDATE DATE
TRANSAMT NUMBER(6,2)
CUSTNO TRANSDATE TRANSAMT
11 01-JAN-07 1000
22 01-FEB-07 2000
33 01-MAR-07 3000
Dates are stored in the default date format dd-mon-rr in the CUST_TRANS table.
Which SQL statements would execute successfully? (Choose three .)
A. SELECT transdate + '10' FROM cust_trans;
B. SELECT * FROM cust_trans WHERE transdate = '01-01-07';
C. SELECT transamt FROM cust_trans WHERE custno > '11';
D. SELECT * FROM cust_trans WHERE transdate='01-JANUARY-07';
E. SELECT custno + 'A' FROM cust_trans WHERE transamt > 2000;
Answer: ACD
答案解析:
参考:http://blog.csdn.net/rlhua/article/details/12832019
A,日期隐式转换为字符型。正确
B, '01-01-07'为特定格式,需要用to_date函数转换。
C,custno 为字符,字符与字符相比较,正确。
D, 01-JAN-07 等同于01-JANUARY-07,不需要转换函数,可隐式转换。正确。
E,错误,不能使用+。