REPLACE new line character in MYSql not working
You can match a newline character using \n
, not \\n
.
Code:
UPDATE aboutme
SET abouttext=REPLACE(abouttext,'\n','')
WHERE userid='5099a95cd944b8.22468149';
If \n
does not work as in my case, the following worked \r\n
UPDATE aboutme
SET abouttext=REPLACE(abouttext,'\r\n','')
WHERE userid='5099a95cd944b8.22468149';
In my case it has been a web application.