Rpad

String Function

Description

Extends the string to length of length parameter by appending the characters fill (a space by default). If the string is already longer than length then it is truncated.

Click here to navigate to the PostgreSQL docs page for this syntax.

Grammar Syntax

RPAD( string text, length integer [, fill text ] )

Sample Source Patterns

PostgreSQL

SELECT RPAD('12345', 10, 'X');

Snowflake

SELECT RPAD('12345', 10, 'X');

Last updated

Was this helpful?