function Introduction
The Lpad function fills the string with the specified character from the left. From its literal meaning can also be understood, L is the left shorthand, pad is the meaning of padding, so the lpad is the meaning of the padding.
The syntax format is as follows:
Lpad (String, Padded_length, [pad_string])
String
Prepares the string to be filled;
Padded_length
The length of the string after padding, that is, the length of the string returned by the function, if the number is shorter than the length of the original string, the Lpad function will intercept the string as a left-to-right n character;
Pad_string
Padding string, is an optional argument, this string is to be pasted to the left of string, if this parameter is not written, the Lpad function will paste a space on the left side of the string.
Instance
Perform Sql:select lpad (' ABCDE ', ' X ') from dual;
return: XXXXXABCDE
Introduction to Oracle Lpad function usage