93.View the Exhibit and examine the structure of the CUSTOMERS table. Using the CUSTOMERS table, y o
来源:互联网 发布:如何看淘宝价格曲线 编辑:程序博客网 时间:2024/06/05 06:19
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.
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;
答案:D
这道题其实主要考察nvl函数参数类型的问题,nvl(exp1,exp2),如果exp1为null那么返回exp2,
exp1和exp2类型必须相同,如果不相同那么系统会将exp2会转换为exp1,
A:错误,Not Available无法转换成number类型
B:错误,同上
C:错误,同上
D:正确,按照字符进行处理
Customers whose credit limit has not been entered should have the message " Not Available" displayed.
Which SQL statement would produce the required result?
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;
答案:D
这道题其实主要考察nvl函数参数类型的问题,nvl(exp1,exp2),如果exp1为null那么返回exp2,
exp1和exp2类型必须相同,如果不相同那么系统会将exp2会转换为exp1,
下面看一下示例
SQL> select nvl('abc',123) from dual;NVL('ABC',123)--------------abcSQL> select nvl(123,'abc') from dual;select nvl(123,'abc') from dualORA-01722: 无效数字SQL> select nvl(123,'234') from dual;NVL(123,'234')-------------- 123SQL> create table customers (cust_credit_limit number);Table createdSQL> insert into customers values('1');1 row insertedSQL> insert into customers values('0.5');1 row insertedSQL> insert into customers values(null);1 row insertedSQL> commit;Commit completeSQL> SELECT NVL(cust_credit_limit,'Not Available') "NEW CREDIT" FROM customers;SELECT NVL(cust_credit_limit,'Not Available') "NEW CREDIT" FROM customersORA-01722: 无效数字SQL> SELECT NVL(cust_credit_limit,'88999') "NEW CREDIT" FROM customers;NEW CREDIT---------- 1 0.5 88999SQL>但是如果没有数据的话,就会成功
SQL> SELECT NVL(cust_credit_limit,'Not Available') "NEW CREDIT" FROM customers;NEW CREDIT----------SQL>这道题没有说有没有数据,就按有数据处理吧
A:错误,Not Available无法转换成number类型
B:错误,同上
C:错误,同上
D:正确,按照字符进行处理
0 0
- 93.View the Exhibit and examine the structure of the CUSTOMERS table. Using the CUSTOMERS table, y o
- 79.View the Exhibit and examine the structure of the CUSTOMERS table. In the CUSTOMERS table, the CU
- 8.View the Exhibit and examine the structure of the CUSTOMERS table.
- 54.View the Exhibit and examine the structure of the CUSTOMERS table.
- 65.View the Exhibit and examine the structure of the CUSTOMERS table.
- 110.View the Exhibit and examine the structure of the CUSTOMERS table.
- 111.View the Exhibit and examine the structure of the CUSTOMERS table.
- 115.View the Exhibit and examine the structure of the CUSTOMERS table.
- 145.View the Exhibit and examine the structure of the CUSTOMERS table.
- 159.View the Exhibit and examine the structure of the CUSTOMERS table.
- 60.View the Exhibit and examine the structure of CUSTOMERS table.
- 62.View the E xhibit and examine the structure of the CUSTOMERS table.
- 1.View the Exhibit and examine the structure of the SALES, CUSTOMERS, PRODUCTS, and TIMES tables.
- 151.View the Exhibit and examine the structure of the CUSTOMERS and CUST_HISTORY tables.
- 157.View the Exhibit and examine the structure of the ORDERS and CUSTOMERS tables.
- 15.View the Exhibit and examine the data in the CUSTOMERS table.
- 163.View the Exhibit and examine the description for the CUSTOMERS table.
- 165.View the Exhibit and examine the description for the CUSTOMERS table.
- 运行selenium-server-standalone.jar时,Firefox无法在***找到该文件
- JavaScript之window.onload = somefunction 笔记
- 人云亦云,非我辈风范。以自己的眼睛去看。
- mysql 按照某个字段括号里的字符串排序
- libsvm与liblinear的区别
- 93.View the Exhibit and examine the structure of the CUSTOMERS table. Using the CUSTOMERS table, y o
- log4j日志优化:使用BufferedIO和BufferSize而不是ImmediateFlush
- Oracle directory查询
- greenDAO的使用
- JAVA基础集合框架(一)
- 【转稿】:农村孩子为什么没有春天
- 手记NO1
- jsp自动登录设计思路(相对来说比较安全)
- ListView异步加载图片方法和滚动优化