Multiple choice technology databases

select translate('abcda','ab','ef') from dual; The o/p would be...

  1. efcda

  2. efcde

  3. ef

  4. ab

  5. 1

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

TRANSLATE does character-by-character replacement following position mapping: 'a'→'e', 'b'→'f', remaining characters unchanged. So 'abcda' becomes 'efcde'. The 'a' at positions 1 and 5 both become 'e'; 'b' becomes 'f'; 'c' and 'd' stay unchanged.