Replace space (“ ”) with no space (“”) in one column in mysql

Replace space (“ ”) with no space (“”) in one column in mysql

I need to remove space in one column in mysql

 

Asked on October 1, 2019 in MySQL.

You can use :

SELECT SUBSTRING_INDEX('TACOMA, Washington, 98477', ',', 2)

And the update statement :

UPDATE my_table
    SET my_col = SUBSTRING_INDEX(my_col, ',', 2)

Where you need to replace my_table with your table name and my_col with the column you need to be updated.

on October 1, 2019.
Add Comment
0 Answer(s)

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.