sql - Replace \n\r in MySQL database -


how can replace \n\r in fields inside database new line? data previous table has column type set wrong.

this should work

update `table` set `column` = replace(`column`, '\\r\\n', '\r\n'); 

nevertheless backup before try!

you might want replace single occurrences after too:

update `table` set `column` = replace(`column`, '\\n', '\n'); update `table` set `column` = replace(`column`, '\\r', '\r'); 

since not os use \r\n combination line breaks.


Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -