Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam 1z0-071 All Questions

View all questions & answers for the 1z0-071 exam

Exam 1z0-071 topic 1 question 178 discussion

Actual exam question from Oracle's 1z0-071
Question #: 178
Topic #: 1
[All 1z0-071 Questions]

The CUSTOMERS table has a CUST_LAST_NAME column of data type VARCHAR2.

The table has two rows whose CUST_LAST_NAME values are Anderson and Ausson.

Which query produces output for CUST_LAST_NAME containing Oder for the first row and Aus for the second?

  • A. SELECT REPLACE(REPLACE(cust_last_name, ‘son’, ‘’), ‘An’, ‘O’) FROM customers;
  • B. SELECT REPLACE(TRIM(TRAILING ‘son’ FROM cust_last_name), ‘An’, ‘O’) FROM customers;
  • C. SELECT REPLACE(SUBSTR(cust_last_name, -3), ‘An’, ‘O’) FROM customers;
  • D. SELECT INITCAP(REPLACE(TRIM(‘son’ FROM cust_last_name), ‘An’, ‘O’)) FROM customers;
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
NICK9525
9 months ago
create table customers (cust_last_name varchar2(10)) select * from customers; insert into customers values ('Anderson') insert into customers values('Ausson') select replace (replace(cust_last_name,'son',''),'An','O') from customers; -- + select replace (trim(trailing 'son' from cust_last_name),'An','O') from customers; -- trim should have only one character select replace (substr (cust_last_name,-3),'An','O') from customers; -- both values are 'son' select initcap(replace(trim('son' from cust_last_name),'An','O')) from customers; -- trim should have only one character
upvoted 2 times
...
lucemqy
1 year ago
Selected Answer: A
A is the answer
upvoted 1 times
...
Raghu06raj2023
1 year ago
A is the answer
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...