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)- A80% (37)
- C13% (6)
- D7% (3)
Community Discussion
No community discussion yet for this question.