OracleString FunctionsLPAD
INSTR

LPADString Functions

RPAD

Left-pads a string to a specified length.

Syntax

LPAD(str, n [, pad])

Example

Enter values below to update the example in real time.

employee_id
emp_code
employees
SELECT LPAD(TO_CHAR(employee_id), 8, '0') AS emp_code
FROM employees;