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’.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • StumbleUpon
  • Technorati
  • Reddit
  • Facebook
  • Google
  • Live
  • YahooMyWeb
  • Furl
  • Slashdot
  • Spurl
  • Mixx
  • BlinkList
  • Bumpzee

Tags: