Home » Mysql » Adding a leading zero to some values in column in MySQL

Adding a leading zero to some values in column in MySQL

Posted by: admin May 17, 2018 Leave a comment

Questions:

I have a CSV file sent to me in CSV. The field of interest is 8 digits. Some of those started with a 0. The field was sent numeric. So, I now have dropped some leading zeros.

I already converted the field to varchar. I now need to do this:

I have this now:

12345678
1234567

I need to have this:

12345678
01234567
Answers: