REPLACE: all instances of the second string in the first are replaced by the third string : REPLACE « String Functions « SQL Server / T-SQL






REPLACE: all instances of the second string in the first are replaced by the third string


1> -- REPLACE: all instances of the second string in the first are replaced by the third string.
2>
3> -- REPLACE(string to search, string to find, string to replace)
4>
5> SELECT REPLACE("www.java2s.com","a","sql server")
6> GO
--------------------------------------------
www.jsql servervsql server2s.com

(1 rows affected)
1>
           
       








Related examples in the same category

1.REPLACE(): replace all occurrences of one character or substring
2.REPLACE spaces