首页 > 数据库 > Oracle > OCP 1Z0-051-77
Evaluate the following query:
|
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
答案:(B)
解析:
position为负数,则从后向前查,然后再向后取指定个数的字符。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/17013648/viewspace-1162356/ ,如需转载,请注明出处,否则将追究法律责任。