post icon

How to remove white space in a mysql field?

Execute SQL Command

UPDATE Country set State_Name = TRIM(State_Name);

Where State_Name in function TRIM hold values with spaces, and TRIM Function removes any white spaces and update the field in same table.

Comments are closed.

Leave a comment