I have tried following this and this as I need to pad a column with zeros.
So I have a field
name_id
1
2
21
74
And I want it to be like
name_id
001
002
021
074
So I have tried doing this:
SELECT RIGHT('000'+ name_id,3) from tblCoordinates;
But the result is:
RIGHT('000'+name_id,3)
1
2
21
74
I am using MySQL Server 2005. What is wrong with select statement? Thanks