OCP 1Z0 051 82
来源:互联网 发布:明星开的淘宝店 编辑:程序博客网 时间:2024/05/01 11:02
82. Examine the data in the CUST_NAME column of the CUSTOMERS table.
CUST_NAME
Renske Ladwig
Jason Mallin
Samuel McCain
Allan MCEwen
Irene Mikkilineni
Julia Nayer
You need to display customers' second names where the second name starts with "Mc" or "MC."
Which query gives the required output?
A. SELECT SUBSTR(cust_name, INSTR(cust_name,' ')+1)
FROM customers
WHERE INITCAP(SUBSTR(cust_name, INSTR(cust_name,' ')+1))='Mc';
B. SELECT SUBSTR(cust_name, INSTR(cust_name,' ')+1)
FROM customers
WHERE INITCAP(SUBSTR(cust_name, INSTR(cust_name,' ')+1)) LIKE 'Mc%';
C. SELECT SUBSTR(cust_name, INSTR(cust_name,' ')+1)
FROM customers
WHERE SUBSTR(cust_name, INSTR(cust_name,' ')+1) LIKE INITCAP('MC%');
D. SELECT SUBSTR(cust_name, INSTR(cust_name,' ')+1)
FROM customers
WHERE INITCAP(SUBSTR(cust_name, INSTR(cust_name,' ')+1)) = INITCAP('MC%');
substr没有第三个参数时,取指定位置到末尾所有的字符
initcap 把所有单词,首字母大写,其它字母小写
所以A有等值判断不对
C 大小写不一致
D等值判断不对
Answer: B
CUST_NAME
Renske Ladwig
Jason Mallin
Samuel McCain
Allan MCEwen
Irene Mikkilineni
Julia Nayer
You need to display customers' second names where the second name starts with "Mc" or "MC."
Which query gives the required output?
A. SELECT SUBSTR(cust_name, INSTR(cust_name,' ')+1)
FROM customers
WHERE INITCAP(SUBSTR(cust_name, INSTR(cust_name,' ')+1))='Mc';
B. SELECT SUBSTR(cust_name, INSTR(cust_name,' ')+1)
FROM customers
WHERE INITCAP(SUBSTR(cust_name, INSTR(cust_name,' ')+1)) LIKE 'Mc%';
C. SELECT SUBSTR(cust_name, INSTR(cust_name,' ')+1)
FROM customers
WHERE SUBSTR(cust_name, INSTR(cust_name,' ')+1) LIKE INITCAP('MC%');
D. SELECT SUBSTR(cust_name, INSTR(cust_name,' ')+1)
FROM customers
WHERE INITCAP(SUBSTR(cust_name, INSTR(cust_name,' ')+1)) = INITCAP('MC%');
substr没有第三个参数时,取指定位置到末尾所有的字符
initcap 把所有单词,首字母大写,其它字母小写
所以A有等值判断不对
C 大小写不一致
D等值判断不对
SQL> SQL> CREATE OR REPLACE VIEW customers(CUST_NAME) 2 AS 3 SELECT 'Renske Ladwig' from dual union all 4 SELECT 'Jason Mallin' from dual union all 5 SELECT 'Samuel McCain' from dual union all 6 SELECT 'Allan MCEwen' from dual union all 7 SELECT 'Irene Mikkilineni' from dual union all 8 SELECT 'Julia Nayer' from dual;View createdSQL> SELECT cust_name, 2 substr(cust_name, instr(cust_name, ' ') + 1) AS sub, 3 initcap(substr(cust_name, instr(cust_name, ' ') + 1)) AS "INITCAP" 4 FROM customers;CUST_NAME SUB INITCAP----------------- ---------------------------------- ----------------------------------Renske Ladwig Ladwig LadwigJason Mallin Mallin MallinSamuel McCain McCain MccainAllan MCEwen MCEwen McewenIrene Mikkilineni Mikkilineni MikkilineniJulia Nayer Nayer Nayer6 rows selected
SQL> SELECT substr(cust_name, instr(cust_name, ' ') + 1) 2 FROM customers 3 WHERE initcap(substr(cust_name, instr(cust_name, ' ') + 1)) LIKE 'Mc%';SUBSTR(CUST_NAME,INSTR(CUST_NA----------------------------------McCainMCEwen2 rows selected
Answer: B
0 0
- OCP 1Z0 051 82
- OCP 1Z0 052 82
- OCP 1Z0 053 82
- OCP 1Z0 051 1
- OCP 1Z0 051 2
- OCP 1Z0 051 3
- OCP 1Z0 051 4
- OCP 1Z0 051 5
- OCP 1Z0 051 6
- OCP 1Z0 051 7
- OCP 1Z0 051 8
- OCP 1Z0 051 9
- OCP 1Z0 051 10
- OCP 1Z0 051 11
- OCP 1Z0 051 12
- OCP 1Z0 051 13
- OCP 1Z0 051 14
- OCP 1Z0 051 15
- 【js设计模式笔记---代理模式】
- Android 底部菜单的实现方法
- 微博转移
- JDBC连接MySQL数据库及示例
- Mahout朴素贝叶斯文本分类
- OCP 1Z0 051 82
- oracle教程
- libcurl 各种版本下载网址
- editplus编译执行java的配置方法
- data_support/ccCArray(c 数组)
- 数组移位
- component/CCComponentContainer(接口容器)
- Java中使用时间的类集合,Calendar:日历类
- 京东上市 员工却不知道自己持多少股