나는 이렇게 학습한다/Algorithm & SQL

Remove String Spaces

daco2020 2022. 6. 4. 00:52
반응형

Simple, remove the spaces from the string, then return the resultant string.

 

Solution:

SELECT 
  x, REPLACE(x, ' ', '') AS res 
FROM 
  nospace

 

Result:

x res
8 j 8 mBliB8g imjB8B8 jl B 8j8mBliB8gimjB8B8jlB
8 8 Bi fk8h B 8 BB8B B B B888 c hl8 BhB fd 88Bifk8hB8BB8BBBB888chl8BhBfd
8aaaaa dddd r 8aaaaaddddr
jfBm gk lf8hg 88lbe8 jfBmgklf8hg88lbe8

 

 

 

반응형