ITPub博客

首页 > 数据库 > Oracle > OCP 1Z0-051-82

OCP 1Z0-051-82

原创 Oracle 作者:LuiseDalian 时间:2014-05-17 07:23:33 0 删除 编辑
(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%');


答案:(B)

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/17013648/viewspace-1163102/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: OCP 1Z0-051-86
下一篇: OCP 1Z0-051-84
请登录后发表评论 登录
全部评论

注册时间:2012-02-06

  • 博文量
    1986
  • 访问量
    6040940