105. LPAD - llighter/database GitHub Wiki
LPAD Oracle Help Centor
Syntax
Purpose
LPAD
returns expr1
, left-padded to length n
characters with the sequence of characters in expr2
. This function is useful for formatting the output of a query.
If you do not specify expr2
, then the default is a single blank.
If expr1
is longer than n
, then this function returns the portion of expr1
that fits in n
.
The argument n
is the total length of the return value as it is displayed on your terminal screen.
In some multibyte character sets, the display length of a character string can differ from the number of characters in the string.
Examples
SELECT LPAD('Page 1',15,'*.') "LPAD example"
FROM DUAL;
LPAD example
---------------
*.*.*.*.*Page 1