In MySQL we can use the REPLACE
statement to replace data in an existing table without inserting a new row. When we do this, we have a choice of syntax when it comes to selecting the row to replace.
One option (and probably the most common option) is to use the VALUES
clause. Another option is to use the SET
clause.
Below is an example of using the SET
clause when using MySQL’s REPLACE
statement.