POSITION
LPAD
RPAD
Left-pads a string to a specified length.
LPAD(str, n, fill)
Enter values below to update the example in real time.
employee_id
emp_code
employees
SELECT LPAD(employee_id::text, 8, '0') AS emp_code FROM employees;