46、(10-4) choose two:

Examine the data in the CUST_NAME column of the CUSTOMERS table.

CUST_NAME

----------------------

Lex De Haan

Renske Ladwig

Jose Manuel Urman

Jason Mallin

You want to extract only those customer names that have three names and display the * symbol in

place of the first name as follows:

CUST_NAME

-----------------------

*** De Haan

**** Manuel Urman

Which two queries give the required output?

A) SELECT LPAD(SUBSTR(cust_name,INSTR(cust_name,' ')),LENGTH(cust_name),'*') "CUST NAME" FROM customers

WHERE INSTR(cust_name, ' ',1,2)<>0;

B) SELECT LPAD(SUBSTR(cust_name,INSTR(cust_name,' ')),LENGTH(cust_name)- INSTR(cust_name,' '),'*') "CUST NAME"

FROM customers

WHERE INSTR(cust_name, ' ',1,2)<>0 ;

C) SELECT LPAD(SUBSTR(cust_name,INSTR(cust_name,' ')),LENGTH(cust_name),'*') "CUST NAME"

FROM customers

WHERE INSTR(cust_name, ' ',-1,2)<>0;

D) SELECT LPAD(SUBSTR(cust_name,INSTR(cust_name,' ')),LENGTH(cust_name)- INSTR(cust_name,' '),'*') "CUST NAME"

FROM customers

WHERE INSTR(cust_name, ' ',-1,-2)<>0;

Answer:AC

(解析:题意是:您希望只提取具有三个名称的那些客户名称,并显示*符号来代替名称如下注意条件的用法 INSTR(cust_name, ' ',1,2)<>00,意思是从名字中找空格,从第一个开始,查看第二个空格的位置,如果有,说明名字里面就有三个名称,否则只有两个名称。同时INSTR(cust_name, ' ',-1,-2),从倒数第一个空格开始,不能再用-2 了,要用正数)

【ocp-12c】最新Oracle OCP-071考试题库(46题)的更多相关文章

  1. 【OCP题库-12c】最新CUUG OCP 071考试题库(72题)

    72.View the exhibit for the structure of the STUDENTand FACULTYtables. STUDENT Name Null? Type ----- ...

  2. 【OCP题库-12c】最新CUUG OCP 071考试题库(71题)

    71.(32-18) choose three Which three statements indicate the end of a transaction? (Choose three.) A) ...

  3. 【OCP题库-12c】最新CUUG OCP 071考试题库(70题)

    70.(31-2)choose the best answer: View the Exhibit and examine the structure of the Book table. The B ...

  4. 【OCP题库-12c】最新CUUG OCP 071考试题库(69题)

    69.(31-1)choose the best answer: Evaluate the following query: SELECT INTERVAL '300' MONTH, INTERVAL ...

  5. 【OCP题库】最新CUUG OCP 12c 071考试题库(68题)

    68.(29-13)choose two: Which two statements are true? (Choose two.) A) DICTIONARY is a view that cont ...

  6. 【OCP题库】最新CUUG OCP 12c 071考试题库(67题)

    67.(25-8)choose the best answer: View the Exhibit and examine the structure of CUSTOMERS table. Eval ...

  7. 【OCP题库】最新CUUG OCP 12c 071考试题库(66题)

    66.(22-19)choose two Examine the structure proposed for the TRANSACTIONS table: Which two statements ...

  8. 【OCP题库】最新CUUG OCP 12c 071考试题库(65题)

    65.(22-16) choose the best answer: The CUSTOMERS table has the following structure: You need to writ ...

  9. OCP 12c最新考试题库及答案(071-2)

    2019-02-12 16:23:54   2.(4-7) choose the best answer:You need to display the first names of all cust ...

  10. 【OCP-12c】2019年CUUG OCP 071考试题库(80题)

    80.View the exhibit and examine the structure in ORDERS and ORDER_ITEMS tables. You need to create a ...

随机推荐

  1. We could not complete your iTunes Store request

    We could not complete your iTunes Store request.An unknown error occurred(502). There was an error i ...

  2. RAD C++Builder xe7 std::map xtree BUG

    c++Builder 6 下的std::map还能用,有代码提示. 换到xe7,代码提示出来就一个tt.operator [](),代码没法往下写了. 最后把Target Platforms切换到64 ...

  3. Ubuntu下用devstack单节点部署Openstack

    一.实验环境 本实验是在Vmware Workstation下创建的单台Ubuntu服务器版系统中,利用devstack部署的Openstack Pike版. 宿主机:win10 1803  8G内存 ...

  4. python之time&datetime

    [time] secs:统一值,无local.UTC之分. struct_time:有local.UTC之分. time.time():返回secs,secs为统一值,无local&utc之分 ...

  5. 18.4Sum (Map)

    Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = tar ...

  6. maven下拉项目不能同步

    maven下拉项目不能同步,如下图: 解决方法: 对项目右键,team, 选择这里 我选择第一项,有的需要根据情况选择第二项,如果点击完成后,还是不能同步代码,对项目右键,team,disconnec ...

  7. 单词缩写集 · word abbreviation set

    [抄题]: 一个单词的缩写根据以下的形式.下面是一些缩写的例子 a) it --> it (没有缩写) 1 b) d|o|g --> d1g 1 1 1 1---5----0----5-- ...

  8. python 命令行工具 fire

    简介 A library for automatically generating command line interfaces. Python Fire is a library for auto ...

  9. RabbitMQ的一些说明

    下载安装包后,运行会提示你下再ErLang环境,根据提示下载安装就可以了 RabbitMQ 自己的插件包中带一 个WebUI的管理工具,在RabbitMQ安装目录(bin)下运行 rabbitmq-p ...

  10. 图解利用Word来发布博客

    目前大部分的博客作者在用Word写博客这件事情上都会遇到以下3个痛点: 1.所有博客平台关闭了文档发布接口,用户无法使用Word,Windows Live Writer等工具来发布博客.使用Word写 ...