SyntaxFix
Write A Post
Hire A Developer
Questions
Change the field back to numeric and use ZEROFILL to keep the zeros
ZEROFILL
or
use LPAD()
LPAD()
SELECT LPAD('1234567', 8, '0');