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

Hai*_*ood 6 mysql sql

我有一张桌子

'数'

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

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

就像是

update `table` set number = REPLACE( ' ', '', (select 'number' from `table`));  
Run Code Online (Sandbox Code Playgroud)

有什么能做到的吗?

Joh*_*n P 11

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

update `table` set number = REPLACE( number, ' ', '');
Run Code Online (Sandbox Code Playgroud)


rek*_*o_t 5

UPDATE table SET number = REPLACE(number, ' ', '')
Run Code Online (Sandbox Code Playgroud)