Explain usage of TRANSLATE function in SQL

Questions by sasi_sql

Showing Answers 1 - 3 of 3 Answers

gemini burj

  • Nov 18th, 2007
 

 the translate function replaces a sequence of characters in a string with another set of characters. However, it replaces a single character at a time. For example, it will replace the 1st character in the string_to_replace with the 1st character in the replacement_string. Then it will replace the 2nd character in the string_to_replace with the 2nd character in the replacement_string, and so on.

example select translate('1tech23', '123', '456') from dual will return the below
4tech56
1 will be translated to 4
2 with 5
and 3 with 6

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions