Trimming whitespace from a field in MYSQL
Sometimes whitespace in user entered data can be annoying. Even more annoying if it is imported data, or better yet your fault for not trimming the input. Anyway, its a simple matter to trim a field in MYSQL – see the query below , preserved here for posterity.
UPDATE tablename
SET fieldName = TRIM(fieldName)