Remove whitespaces from a column in MySQL database
To remove all leading and trailing whitespaces :
UPDATE `table_name` SET `column`=trim(`column`);
To remove only the trailing whitespaces :
UPDATE `table_name` SET `column`=trim(TRAILING ' ' FROM `column`);
The above example could be used to remove any character or characters from the begging or end of a text field. For more examples look into mysql function reference.