OCP 1Z0 051 93

来源:互联网 发布:maya导入unity3d 编辑:程序博客网 时间:2024/05/23 00:34
93. View the Exhibit and examine the structure of the CUSTOMERS table. 
Using the CUSTOMERS table, y ou need to generate a report that shows   an increase in the credit limit 
by 15% for all customers. Customers whose credit limit has not been entered should have the message " 
Not Available"   displayed. 
Which SQL statement would produce   the required result?  

A. SELECT NVL(cust_credit_limit,'Not Available')*.15 "NEW CREDIT" 
FROM customers; 
B. SELECT NVL(cust_credit_limit*.15,'Not Available') "NEW CREDIT" 
FROM customers; 
C. SELECT TO_CHAR(NVL(cust_credit_limit*.15,'Not Available')) "NEW CREDIT" 
FROM customers; 
D. SELECT NVL(TO_CHAR(cust_credit_limit*.15),'Not Available') "NEW CREDIT" 
FROM customers; 

nvl两个参数的类型应该一致 A B C中都不一致
SQL> SELECT nvl(cust_credit_limit, 'Not Available') * .15 "NEW CREDIT"  2    FROM sh.customers;SELECT nvl(cust_credit_limit, 'Not Available') * .15 "NEW CREDIT"  FROM sh.customersORA-01722: 无效数字SQL> SELECT nvl(cust_credit_limit * .15, 'Not Available') "NEW CREDIT"  2    FROM sh.customers;SELECT nvl(cust_credit_limit * .15, 'Not Available') "NEW CREDIT"  FROM sh.customersORA-01722: 无效数字SQL> SELECT to_char(nvl(cust_credit_limit * .15, 'Not Available')) "NEW CREDIT"  2    FROM sh.customers;SELECT to_char(nvl(cust_credit_limit * .15, 'Not Available')) "NEW CREDIT"  FROM sh.customersORA-01722: 无效数字SQL> SELECT nvl(to_char(cust_credit_limit * .15), 'Not Available') "NEW CREDIT"  2    FROM sh.customers  3   WHERE rownum <= 5;NEW CREDIT----------------------------------------2251050165022513505 rows selected


Answer: D 
0 0
原创粉丝点击