Để thay thế all spaces :
UPDATE `table` SET `col_name` = REPLACE(`col_name`, ' ', '')
Để xóa tất cả các tab tabs ký tự:
UPDATE `table` SET `col_name` = REPLACE(`col_name`, '\t', '' )
Để xóa tất cả new line ký tự:
UPDATE `table` SET `col_name` = REPLACE(`col_name`, '\n', '')
https://dev.mysql.com/doc /refman/5.0/en/string-functions.html# Chức năng_replace
Để xóa first and last space(s) của cột:
UPDATE `table` SET `col_name` = TRIM(`col_name`)
https://dev.mysql.com/doc /refman/5.0/en/string-functions.html# Chức năng_trim