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...
MySQL SUBSTRING() Function The SUBSTRING() function extracts a substring from a string (starting at any position). Note: The SUBSTR() and MID() functions equals to the SUBSTRING() function.
SELECT LEN(column_name) FROM table_name; And you can use SUBSTRING or SUBSTR() function go get first three characters of a column.
UPDATE users SET data = SUBSTR(data, 2);
This will iterate through all rows in users
and replace data
with itself minus the first character.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With