Hello,
I have numbers (INT) stored in my mysql table. My Grid application will return those numbers, but I need them to be formatted like this (just in the Grid application, not in the database) :
001
010
100
So, I need the number to always be 3 digits in length. The database will return a digit, either single or up to 3 digits, but I alway need enough leading zeros added to the digit in order to fit the 3 digit requirement.
I found that but it’s only for SQL Server :
SELECT right(replicate(‘0’,2) + convert(varchar(3),<ColumnName> ) ,2) from <Tablename>
I would like the same result for Mysql…
Thank you very much for your help !