i want to integrate data with exiting data in a column in phpmyadmin.
for example i have a table which has a column (ticket_number).
And its exiting value is 234 and want to add '1' before 234 so that the value will be 1234. this below written code not working for this.
UPDATE ticket
SET `ticket_number`+= '1';
thanks in advance.
Try using CONCAT:
UPDATE ticket
SET ticket_number = CONCAT(1,ticket_number)
Because if you add up the "1" directly you'll get 235 not 1234...
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