Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有这样的简单表:
id (AUTO_INC) | text (VARCHAR 255) 1 hey!
是否可以修剪所有文本值以删除字段中的所有空白或隐藏空格?
因为如果你能看到这张图片,你会看到“word”字段里面有奇怪的隐藏空格字符:
谢谢你!
要删除\t,\n和空间,你可以做
\t
\n
update your_table set `text` = trim(replace(replace(`text`, '\n', ''), '\t',''))