views:

288

answers:

1

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...
A: 

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

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

Tenner