[MySQL] Update Table Column Entries to Change / to \

A quick post, just something that had me scratching my head for a few minutes as I didn't realize you had to escape the \ character. Here is how to update a column in a table to replace forward slashes with back slashes.

use your_schema;
update your_table set column_name = replace(column_name, '/', '\\');

Image: Replacing forward slashes with backward slashes MySQL Workbench

Comments