I am relatively new to PostgreSQL and I know how to pad a number with zeros to the left in SQL Server but I\'m struggling to figure this out in PostgreSQL.
I have a
As easy as
SELECT lpad(42::text, 4, '0')
References:
sqlfiddle: http://sqlfiddle.com/#!15/d41d8/3665