This Is Why REPLACE Function Is So Famous!

The purpose of REPLACE function is to replace one string with another string.

REPLACE Function

Syntax for REPLACE function

REPLACE (string, find, replace) – The result is a string with the replaced value as given inside of this function. You can learn more SQL Functions for SQL programmer.


- Result is '5555.555.1212'
- Result is '5595551212'
REPLACE ('The quick brown fox', 'QUICK', 'LARGE')
- Result is 'The LARGE brown fox'

Rules for REPLACE

  • If the actual length of the replace-string exceeds the maximum for the return data type, an error is returned.
  • If any argument can be null, the result can be null; if any argument is null, the result is the null value.

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.