MySQL Forums
Forum List  »  Newbie

Padding Zeros for a max of 20 digits
Posted by: Jassim Rahma
Date: January 09, 2022 04:03PM

Hi,

I have wallet_number field which is a BIGINT.

How can I right pad the number with Zeros to make sure it's always 20 digits?

for example if the wallet number is 1 then it should be:

10000000000000000000

and if the number is 111 then it should be:

11100000000000000000

so it's always 20 digits.


Thanks,
Jassim

Options: ReplyQuote


Subject
Written By
Posted
Padding Zeros for a max of 20 digits
January 09, 2022 04:03PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.