The Oracle and PLSQL LPAD function pads the left-side of a string with a specific set of characters (when string1 is not null).
The general format is:
LPAD(char1, n [,char2])
Example 1:
SELECT LPAD('JOHN WILLIAMS',20) FROM DUAL;
returns:
JOHN WILLIAMS
Example 2:
SELECT LPAD('JOHN WILLIAMS',20,'-') FROM DUAL;
returns:
-------JOHN WILLIAMS