nerdexam
Oracle

1Z0-061 · Question #289

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…

The correct answer is A. SELECT LPAD(SUBSTR(cust_name, INSTR(cust_name, ' ')), LENGTH(cust_name), '*') "CUST B. SELECT LPAD(SUBSTR(cust_name, INSTR(cust_name, ' ')), LENGTH(cust_name), '*') "CUST. See the full explanation below for the reasoning.

Question

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? (Choose two.)

Options

  • ASELECT LPAD(SUBSTR(cust_name, INSTR(cust_name, ' ')), LENGTH(cust_name), '*') "CUST
  • BSELECT LPAD(SUBSTR(cust_name, INSTR(cust_name, ' ')), LENGTH(cust_name), '*') "CUST
  • CSELECT LPAD(SUBSTR(cust_name, INSTR(cust_name, ' ')), LENGTH(cust_name)- INSTR
  • DSELECT LPAD(SUBSTR(cust_name, INSTR(cust_name, ' ')), LENGTH(cust_name)- INSTR

How the community answered

(34 responses)
  • A
    82% (28)
  • C
    12% (4)
  • D
    6% (2)

Community Discussion

No community discussion yet for this question.

Full 1Z0-061 Practice