In this post explains how to use the REPLACE function in SQL Server (Transact-SQL) with syntax and examples.
In SQL Server (Transact-SQL), the REPLACE function replaces a sequence of characters in a string with another set of characters, not case-sensitive.
The syntax for the REPLACE function in SQL Server (Transact-SQL) is:
The source string from which a sequence of characters will be replaced by another set of characters.
The string that will be searched for in string1.
The replacement string. All occurrences of string_to_replace will be replaced with replacement_string in string1.
The REPLACE function can be used in the following versions of SQL Server (Transact-SQL):
Let's look at some SQL Server REPLACE function examples and explore how to use the REPLACE function in SQL Server (Transact-SQL).
For example: