I have a mysql table storing some data. One column stores strings containing a comma. I want to get rid of everything (including the comma) in this string and save it, but I don't get it to work. I tried some solutions from here but I don't understand how substring
works in this case.
Example table data:
|------
|id|Name
|------
|6695|Aalen (Württemberg)
|7001|Achern (Baden)
|7133|Aach (Hegau)
|8975|Abenberg, Mittelfranken
|17223|Abbensen, Kreis Peine
|17323|Abbenrode, Kreis Braunschweig
|17608|Abbensen, Han
I want to get it like this:
|------
|id|Name
|------
|6695|Aalen (Württemberg)
|7001|Achern (Baden)
|7133|Aach (Hegau)
|8975|Abenberg
|17223|Abbensen
|17323|Abbenrode
|17608|Abbensen
There are about 60.000 rows, so faster solutions would be good.