RPAD
Right-pad a string. This function pads a string on the right side with a specified string until it reaches a certain length.
Syntax
RPAD(str, len [, padstr])Description
Examples
SELECT RPAD('hello',10,'.');
+----------------------+
| RPAD('hello',10,'.') |
+----------------------+
| hello..... |
+----------------------+
SELECT RPAD('hello',2,'.');
+---------------------+
| RPAD('hello',2,'.') |
+---------------------+
| he |
+---------------------+See Also
Last updated
Was this helpful?

