exam questions

Exam 1z0-082 All Questions

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

Exam 1z0-082 topic 1 question 146 discussion

Actual exam question from Oracle's 1z0-082
Question #: 146
Topic #: 1
[All 1z0-082 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(SUBSTR(cust_last_name, -3), 'An', 'O') FROM customers;
  • B. SELECT REPLACE(TRIM(TRAILING 'son' FROM cust_last_name), 'An', 'O') FROM customers;
  • C. SELECT INITCAP(REPLACE(TRIM('son' FROM cust_last_name), 'An', 'O')) FROM customers;
  • D. SELECT REPLACE(REPLACE(cust_last_name, 'son', ''), 'An', 'O') FROM customers;
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
musafir
6 months, 2 weeks ago
Selected Answer: D
D is correct
upvoted 2 times
...
Darkseid1231
6 months, 4 weeks ago
D is correct
upvoted 1 times
...
auwia
7 months ago
Selected Answer: B
Provided answer is correct
upvoted 1 times
auwia
7 months ago
D I'm sorry
upvoted 2 times
...
...
[Removed]
8 months, 3 weeks ago
D is OK. B is not the wright answer. You will got an error: ORA-30001: trim set should have only one character 30001. 00000 - "trim set should have only one character" *Cause: Trim set contains more or less than 1 character. This is not allowed in TRIM function.
upvoted 4 times
...
bllu
8 months, 4 weeks ago
Selected Answer: D
D is correct
upvoted 1 times
...
j_tw
9 months, 1 week ago
I think B also can be the answer. TRIM(TRAILINIG 'son' from CUST_LAST_NAME) command will delete 'son' from right side. Than Anderson will be Ander, and Ausson will be Aus.
upvoted 1 times
auwia
7 months ago
Trim/trailing works with 1 character only. D is correct.
upvoted 3 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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago