scalar

RPAD

Pads on the right or truncates to the requested character length. Example target: PostgreSQL 17. No tables or extensions required.

Formal Syntax & Structure

sql syntaxsql
RPAD(text,length,fill)

Working Example

Example Snippetsql
SELECT rpad('7',3,'0');
SQL Reference