Does the MySQL TRIM function not trim line breaks or carriage returns?

后端 未结 10 1836
旧时难觅i
旧时难觅i 2020-12-03 13:58

From my experiments, it does not appear to do so. If this is indeed true, what is the best method for removing line breaks? I\'m currently experimenting with the parameters

10条回答
  •  一个人的身影
    2020-12-03 14:22

    select trim(both '\r\n' from FIELDNAME) from TABLE; should work if select trim(both '\n' from FIELDNAME) from TABLE; doesn't work.

提交回复
热议问题