Lpad
String Function
Description
Extends the given
stringto the specifiedlengthby prepending the selected charactersfill(a space by default). If thestringis already longer thanlengththen it is truncated (on the right).
Click here to navigate to the PostgreSQL docs page for this syntax.
The function Lpad() is supported on Snowflake.
Grammar Syntax
LPAD(string text, length integer [, fill text ] ) Sample Source Patterns
PostgreSQL
SELECT LPAD('12345', 10, 'X');XXXXX12345Snowflake
SELECT LPAD('12345', 10, 'X');XXXXX12345Last updated
Was this helpful?