0

For example i have ints 12 and 7 I want to convert this numers to 5-char string with leading zeros, so 12 -> 00012, 7->00007. It is possible to do it in postgres?

mtmx
  • 827
  • 1
  • 10
  • 31

1 Answers1

1

Ok, I find the answer

SELECT TO_CHAR(7,'fm00000');
SELECT TO_CHAR(12,'fm00000');
mtmx
  • 827
  • 1
  • 10
  • 31