5 May 2013

Sometimes when you import lines from txt files you might get \r in the end of lines. When you think it's easier to remove trailing carriage returns than reimporting then you can use this query.

Source code viewer
  1. UPDATE table_name SET column_name = TRIM(TRAILING '\r' FROM column_name)
Programming Language: MySQL