繁体   English   中英

从mysql中的列中删除所有空格?

[英]strip all spaces from column in mysql?

我有一张桌子

'数'

1234
12 34
1 2 34
1 2 3 4
等...

所以,我想知道如何编写一个删除所有空格的查询?

就像是

update `table` set number = REPLACE( ' ', '', (select 'number' from `table`));  

有什么能做到的吗?

关。 我相信你可以这样写:

update `table` set number = REPLACE( number, ' ', '');
UPDATE table SET number = REPLACE(number, ' ', '')

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM