LPAD() adds the first character from the specified list to the left side of a string until it reaches the desired length. If no characters are specified in the list, LPAD() adds spaces to the left side. This function is useful for string formatting, alignment, and padding. LPAD() is similar to RPAD(), which adds characters to the right side of a string.
LPAD(string, length [, list])
LPAD() returns a character string
LPAD("APPLES", 10, ".") = "....APPLES" (padded with dots)
LPAD("APPLES", 10) = " APPLES" (padded with spaces)
LPAD("APPLES", 3) = "APP" (truncated to length)
LPAD("123", 5, "0") = "00123" (zero-padded number)
LPAD("", 5, "*") = "*****" (empty string padded)
LPAD(NULL, 5, "*") = NULL (NULL input)
LPAD("ABC", 5, "12") = "11ABC" (uses first character from list)