RPAD
Syntax
RPAD(expr1, num [, expr2])
Overview
RPAD
is a function that concatenates expr2 on the right side of expr1 and returns a string with length equal to num.
In most character sets, the number of characters in the returned string is the same as its length, but in multi-byte character sets such as Korean, the two values may differ.
Parameter
Parameter
Description
expr1
Arbitrary operation expression that returns a string, CLOB type, or BLOB type. If the length of expr1 is greater than num, returns the string from the left side of expr1 that is equal to num.
expr2
Arbitrary operation that returns a string, CLOB type, or BLOB type. If expr2 is not specified, a space character is used.
num
Arbitrary operation that returns a numeric value. num refers to the length of the output to the terminal.
Example
SELECT RPAD('RPAD', 10, '-=');
rpad
------------
RPAD-=-=-=
(1 row)
Last updated