Removing line breaks and tabs in a MySQL column

Share this post:

Sometimes it happens that you have unwanted tabs, line breaks, paragraphs, etc. in a table column. With the following code snippet you can clean the value of the column quickly:

[sql]update mytable
set mycolumn = REPLACE(REPLACE(REPLACE(mycolumn, ‘t’, ”), ‘r’, ”), ‘n’, ”)[/sql]

Over 10 years in business.

Self-funded. No investors. No bullshit.

More than 3,000 customers worldwide.

Helpmonks - no bullshit customer engagement service

Growth starts with action

Empower your team and delight your customers.

Helpmonks - email management for small businesses