How to convert int to char with leading zeros? December 20, 2022 by Tarik Try this: select right('00000' + cast(Your_Field as varchar(5)), 5) It will get the result in 5 digits, ex: 00001,…., 01234