您的位置:首页 > 其它

OCP-1Z0-051-V9.02-77题

2013-10-18 14:39 513 查看
77. In the CUSTOMERS table, the CUST_CITY column contains the value 'Paris' for the
CUST_FIRST_NAME 'ABIGAIL'.
Evaluate the following query:
SQL> SELECT INITCAP(cust_first_name ' '
UPPER(SUBSTR(cust_city,-LENGTH(cust_city),2)))
FROM customers
WHERE cust_first_name = 'ABIGAIL';
What would be the outcome?
A. Abigail PA
B. Abigail Pa
C. Abigail IS
D. an error message
Answer: B
答案解析:
参考:/article/1628983.html
此为嵌套函数,由里到外可知:
LENGTH(cust_city)=LENGTH('Paris')=5
SUBSTR(cust_city,-5,2)=从右往左第5个,在顺着输出2个字符,即Pa
UPPER(Pa)=PA

INITCAP(cust_first_name ' ' UPPER(SUBSTR(cust_city,-LENGTH(cust_city),2)))=INITCAP('ABIGAIL' '' 'PA')=Abigail Pa

即选B。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: