What would be a sql query to remove \n\r from the text?

后端 未结 7 1787
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-17 15:13

I am using MySQL. My data has a column called text, which uses the TEXT data type.

There are several newlines for each record in this column. I want to

7条回答
  •  醉话见心
    2020-12-17 15:14

    i've tried all said here but neither worked for me, my DB is IBM Informix, however i managed to solve the problem like this:

    UPDATE personas SET foto_path = SUBSTRING(foto_path FROM 1 FOR LENGTH(foto_path) - 1);
    

    Hope it helps other in similar situation.

提交回复
热议问题