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