S
S
Sergey Zhukov2015-12-22 15:00:14
PHP
Sergey Zhukov, 2015-12-22 15:00:14

How to remove \n in Mysql field?

Hi all.
There is a simple table Streets , There is one string expression in the name field, but \n got there, i.e. line break.
The question is how to cut it out with a MYSQL query?
Mind was only enough for
UPDATE Streets SET name = TRIM(name)
Well, and a couple of other variations did not work

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2015-12-22
@Adobe

UPDATE Streets SET name = REPLACE(name, "\n", "")
Trim, according to the docs, can also:
TRIM(BOTH "\n" FROM name)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question