Oracle翻译函数

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Oracle翻译函数相关的知识,希望对你有一定的参考价值。

A few examples of the TRANSLATE function.
  1. --Example 1
  2. SELECT 'Complete IT Professional' AS SAMPLE_TEXT,
  3. TRANSLATE('Complete IT Professional', 'o', 'X') AS TRANSLATE_TEST
  4. FROM dual;
  5.  
  6. --Example 2
  7. SELECT 'Complete IT Professional' AS SAMPLE_TEXT,
  8. TRANSLATE('Complete IT Professional', 'Is', 'SW') AS TRANSLATE_TEST
  9. FROM dual;
  10.  
  11. --Example 3
  12. SELECT 'Complete IT Professional' AS SAMPLE_TEXT,
  13. TRANSLATE('Complete IT Professional', 'IsC m', 'SWx2q') AS TRANSLATE_TEST
  14. FROM dual;
  15.  
  16. --Example 4
  17. SELECT 'Complete IT Professional' AS SAMPLE_TEXT,
  18. TRANSLATE('Complete IT Professional', 'omsi', '12') AS TRANSLATE_TEST
  19. FROM dual;
  20.  
  21. --Example 5
  22. SELECT 'Complete IT Professional' AS SAMPLE_TEXT,
  23. TRANSLATE('Complete IT Professional', 'omsi', '') AS TRANSLATE_TEST
  24. FROM dual;
  25.  
  26. --Example 6
  27. SELECT 'Complete IT Professional' AS SAMPLE_TEXT,
  28. TRANSLATE('Complete IT Professional', 'x', 'a') AS TRANSLATE_TEST
  29. FROM dual;
  30.  
  31. --Example 7
  32. SELECT 'Complete IT Professional' AS SAMPLE_TEXT,
  33. REPLACE('Complete IT Professional', 'let', 'sip') AS REPLACE_TEST,
  34. TRANSLATE('Complete IT Professional', 'let', 'sip') AS TRANSLATE_TEST
  35. FROM dual;

以上是关于Oracle翻译函数的主要内容,如果未能解决你的问题,请参考以下文章

oracle常用函数

转,Oracle——decode函数

oracle decode函数和 sign函数

oracle decode函数和 sign函数

Oracle翻译函数

oracle decode函数的使用