MySQL RPAD Function

Example

Right-pad the string with “ABC”, to a total length of 20:

SELECT RPAD("SQL Tutorial", 20, "ABC");

Definition and Usage

The RPAD() function right-pads a string with another string, to a certain length.

Note: Also look at the LPAD() function. Continue reading MySQL RPAD Function