In SQL, RPAD()
is used to pad the right part of a string with a specified character. The function can be used on strings and numbers, although depending on the DBMS, numbers may have to be passed as a string before they can be padded.
DBMSs that have an RPAD()
function include MySQL, MariaDB, PostgreSQL, and Oracle.
DBMSs that don’t have an RPAD()
function include SQL Server and SQLite.