select replace ('beer bucket','beer','milk') as replace_1 : REPLACE « Character String Functions « Oracle PL/SQL Tutorial






SQL>
SQL>
SQL>
SQL> select replace  ('beer bucket','beer','milk') as replace_1
  2  from   dual;

REPLACE_1
-----------
milk bucket

SQL>








11.16.REPLACE
11.16.1.The REPLACE Function
11.16.2.If the look for string is not present, then the replacing does not occur
11.16.3.REPLACE(x, search_string, replace_string) searches x for search_string and replace it with replace_string.
11.16.4.select replace ('beer bucket','beer','milk') as replace_1
11.16.5.select replace ('beer bucket','beer') as replace_2
11.16.6.translate vs replace