MYSQL - UPDATE first char of string in COLUMN -
i update first char of column in mysql
where format of string '1-%'
change first char '0'.
i have created example , think on right tracks...
update products set has_roundel = replace(has_roundel, substring(has_roundel, 0, 1),'0') has_roundel '1-%';
mysql substring isnt starting 0.
you can use:
update products set has_roundel = replace(has_roundel, substring(has_roundel, 1, 1),'0') has_roundel '1-%';
or:
update products set has_roundel = replace(has_roundel, substring(has_roundel, 1),'0') has_roundel '1-%';
Comments
Post a Comment