April 2008
Intermediate to advanced
566 pages
21h 55m
English
REPLACE()
REPLACE(string,old_element,new_element)
This function goes through the first argument and returns a string in which every occurrence of the second argument is replaced with the third argument. Here is an example:
UPDATE students, REPLACE(title, 'Mrs.', 'Ms.');
This SQL statement will retrieve each student’s title and
replace any occurrences of “Mrs.” with “Ms.” UPDATE
will change only the rows where the replacement was made.
Read now
Unlock full access