Mysql cut string, the first character?

Viewed 41172

Hi is it possible to cut string like this:

String in "data" columns: ,123,456

Cut the first character i.e "," (comma).

So the query is something like:

Update users set data = cut first string...
1 Answers

UPDATE users SET data = SUBSTR(data, 2);

This will iterate through all rows in users and replace data with itself minus the first character.

Related