I need to increase a value by 1 in MySQL that isn't saved as an Integer: It is saved instead as a String because it may start with a 0
, for instance: 01212120211112
. I want to set this value to 01212120211113
.
The "number" is always 14 char long (including the 0 on the beginning) and it will never get longer or shorter.
- I want to convert it to an Integer
- set it + 1
- Convert back to String
- add a 0 to begin til a length of 14 chars.
Can anyone help me with the syntax?