85.View the Exhibit and examine the structure and data in the INVOICE table.

85.View the Exhibit and examine the structure and data in the INVOICE table.
Which statements are true regarding data type conversion in expressions used in queries? (Choose all that apply.)

A.inv_amt ='0255982' : requires explicit conversion
B.inv_date > '01-02-2008' : uses implicit conversion
C.CONCAT(inv_amt,inv_date) : requires explicit conversion
D.inv_date = '15-february-2008' : uses implicit conversion
E.inv_no BETWEEN '101' AND '110' : uses implicit conversion
答案:DE
解析:
A:错误,number和varchar隐式转换
B:错误,右边的格式不是默认的格式
C:错误,date和number隐式转换
D:正确,日期和varchar显示转换
E:正确,number varchar 隐式转换,正确
SQL> select * from test;


         A INV_DATE
---------- ---------
         1 03-MAR-16

SQL> select * from test where inv_date='03-march-2016';

no rows selected

SQL> select * from test where inv_date='03-march-16';

no rows selected

SQL> select * from test where inv_date='03-mar-16';

no rows selected

SQL> select * from test where inv_date='03-mar-2016';

no rows selected

SQL> select * from test where inv_date='03-03-16';
select * from test where inv_date='03-03-16'
                                  *
ERROR at line 1:
ORA-01843: not a valid month

SQL> select * from test where inv_date='03-03-2016';
select * from test where inv_date='03-03-2016'
                                  *
ERROR at line 1:
ORA-01843: not a valid month

SQL> select value from nls_session_parameters where parameter='NLS_DATE_FORMAT';

VALUE
--------------------------------------------------------------------------------

DD-MON-RR

这里应该是默认会把2008认为08,february认为是feb

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值