nerdexam
Oracle

1Z0-071 · Question #243

Examine the data in the CUST_NAME column of the CUSTOMERS table. You want to extract only those customer names that have three names and display the * symbol in place of the first name as follows…

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. You want to extract only those customer names that have three names and display the * symbol in place of the first name as follows:

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

(46 responses)
  • A
    80% (37)
  • C
    13% (6)
  • D
    7% (3)

Community Discussion

No community discussion yet for this question.

Full 1Z0-071 Practice