This Oracle tutorial explains how to use the Oracle/PLSQL RPAD function with syntax and examples.
The Oracle/PLSQL RPAD function pads the right-side of a string with a specific set of characters (when string1 is not null).
The syntax for the RPAD function in Oracle/PLSQL is:
The string to pad characters to (the right-hand side).
The number of characters to return. If the padded_length is smaller than the original string, the RPAD function will truncate the string to the size of padded_length.
Optional. This is the string that will be padded to the right-hand side of string1. If this parameter is omitted, the RPAD function will pad spaces to the right-side of string1.
The RPAD function returns a string value.
The RPAD function can be used in the following versions of Oracle/PLSQL:
Let's look at some Oracle RPAD function examples and explore how to use the RPAD function in Oracle/PLSQL.
For example: