Link to home
Start Free TrialLog in
Avatar of Tony Pearce
Tony PearceFlag for United Kingdom of Great Britain and Northern Ireland

asked on

MySQL remove any content after a comma

Hi,
I have data in a field, for example 'red,red,green' I would like to be able to run an UPDATE on the database to remove any data after the first comma, including the comma, so above would show, 'red'

Any ideas?
Thanks
Tony
ASKER CERTIFIED SOLUTION
Avatar of johanntagle
johanntagle
Flag of Philippines image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Tony Pearce

ASKER

Thanks, I will try.
worked great. thanks