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

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -