Tuesday, July 17, 2012

Using REPLACE in an UPDATE statement

The REPLACE function is easy to use and very handy with an UPDATE statment.

Replace searches for certain characters in a string and replaces them with other characters.

Syntax:

UPDATE <table name> SET <column name> = REPLACE(<COLUMN Name>, 'oldstring', 'newstring') WHERE <Condition>
Happy Coding…

No comments:

Post a Comment