mysql workbench - Trim all characters in a field after a certain character -
i have column titled email. list of emails. has 2 emails in record, database separates them ' ' (space).
i need deleted space (including space)
i've tried update employee set email = trim(trailing ' ' email);
which found in heaps of other posts nothing!
thanks!
you can use:
http://dev.mysql.com/doc/refman/5.1/en/string-functions.html#function_substring-index
it should like:
update employee set email = substring_index(email, ' ', 1)
Comments
Post a Comment