102.Examine the structure of the TRANSACTIONS table:

102.Examine the structure of the TRANSACTIONS table:
name Null Type

TRANS_ID NOT NULL NUMBER(3)
CUST_NAME VARCHAR2(30)
TRANS_DATE TIMESTAMP
TRANS_AMT NUMBER(10,2)

You want to display the date, time, and transaction amount of transactions that where done before 12
noon. The value zero should be displayed for transactions where the transaction amount has not bee
entered.

Which query gives the required result?
A.SELECT TO_CHAR(trans_date,'dd-mon-yyyy hh24:mi:ss'),
TO_CHAR(trans_amt,'$99999999D99')
FROM transactions
WHERE TO_NUMBER(TO_DATE(trans_date,'hh24')) < 12 AND COALESCE(trans_amt,NULL)<>NULL;
B.SELECT TO_CHAR(trans_date,'dd-mon-yyyy hh24:mi:ss'),
NVL(TO_CHAR(trans_amt,'$99999999D99'),0)
FROM transactions
WHERE TO_CHAR(trans_date,'hh24') < 12;
C.SELECT TO_CHAR(trans_date,'dd-mon-yyyy hh24:mi:ss'),
COALESCE(TO_NUMBER(trans_amt,'$99999999.99'),0)
FROM transactions
WHERE TO_DATE(trans_date,'hh24') < 12;
D.SELECT TO_DATE (trans_date,'dd-mon-yyyy hh24:mi:ss'),
NVL2(trans_amt,TO_NUMBER(trans_amt,'$99999999.99'), 0) FROM transactions
WHERE TO_DATE(trans_date,'hh24') < 12;
答案:B
A:<>NULL,这里错误,参考59题http://blog.csdn.net/dwj19830118/article/details/50766825
B:正确
C:错误,TO_DATE(trans_date,'hh24')这个错误,
D:错误, 同上
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Code inspection, also known as code review, is the process of reviewing source code to identify potential errors, bugs, security vulnerabilities, or other issues. Here are the steps involved in a typical code inspection: 1. Planning: The first step is to plan the code inspection. This involves identifying the objectives of the inspection, selecting the reviewers, and scheduling a time for the inspection. 2. Preparation: The next step is to prepare for the inspection. This involves sending the source code to the reviewers ahead of time, along with any documentation or specifications that may be needed. 3. Review: During the review, the reviewers examine the code line by line, looking for errors, bugs, security vulnerabilities, or other issues. They may use tools such as debuggers, syntax checkers, and code analysis software to help them identify problems. 4. Discussion: After the review is complete, the reviewers discuss their findings with the developer or development team. They may ask questions, seek clarification, or suggest ways to improve the code. 5. Correction: Once the issues have been identified and discussed, the developer makes the necessary corrections to the code. This may involve fixing bugs, optimizing performance, or improving security. 6. Verification: After the corrections have been made, the code is re-inspected to ensure that all issues have been resolved. 7. Documentation: Finally, the results of the inspection are documented for future reference. This may include a summary of the issues found and corrected, as well as any recommendations for improving the development process. Overall, code inspection is a critical component of software development that helps to ensure that code is high-quality, secure, and free from errors and bugs.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值