What is REPLACE in Transact-SQL? It will replace all occurrences of a specified string value with another string value.
The REPLACE syntax
REPLACE (searchedString, foundString, replacedString)
Example,
SELECT REPLACE(’abcdefghicde’,'cde’,'xxx’);
GO
The returned result is “abxxxfghixxx”. Basically, it replaced all the ‘cde’ with ‘xxx’.
Tags: Transact-SQL
RSS feed for comments on this post · TrackBack URI
Leave a reply