| Parameter | Type | Description |
|---|---|---|
str | string | the string to left pad |
length | integer | the length to pad the string to |
pad | string | an optional padding character |
Returns: string
Example
query:
SELECT LPAD("donuts", 9, "!")
results:
| lpad |
|---|
| !!!donuts |
The string function used to left-pad a string to a given length, using a given character (or space, if no character is given).
| Parameter | Type | Description |
|---|---|---|
str | string | the string to left pad |
length | integer | the length to pad the string to |
pad | string | an optional padding character |
query:
SELECT LPAD("donuts", 9, "!")
results:
| lpad |
|---|
| !!!donuts |