Multiple choice technology databases

The output of the query " select translate('123456789','235','xy') from dual; " is

  1. 1x4y6789

  2. 1xy456789

  3. 1xy46789

  4. error

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The Oracle TRANSLATE function replaces characters in a string. It maps '2' to 'x' and '3' to 'y'. Because '5' has no corresponding character in the replacement string 'xy', it is removed entirely. Thus, '123456789' becomes '1xy46789'.