86.Examine the structure and data of the CUST_TRANS table:

来源:互联网 发布:如何开展网络推广 编辑:程序博客网 时间:2024/05/22 10:40
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;
答案:ACD
解析:
A.正确,varchar可以隐式转成数字
B.错误,参考85
C.正确,和A一样
D.正确,参考85
E.错误,两个字符不能使用+运算符
0 0