QuestionQ171

VerifiedUsing Single-Row Functions to Customize Output

The CUSTOMERS table contains a CUST_LAST_NAME column with the VARCHAR2 data type.

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

Which query returns Oder for the first row and Aus for the second in CUST_LAST_NAME output?

Explanation

REPLACE removes all occurrences of a search string when its replacement string is empty. Removing son produces Ander and Aus; replacing An with O then produces Oder and leaves Aus unchanged.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!