postgresql add leading zeros
snippet in sql

postgresql add leading zeros

user2169

SELECT lpad(42::text, 4, '0')