MySQLString FunctionsRPAD
LPAD

RPADString Functions

REPEAT

Right-pads a string to a specified length with a given character.

Syntax

RPAD(str, len, padstr)

Example

Enter values below to update the example in real time.

order_id
status
status_col
orders
-- 상태값을 10칸 고정폭으로 출력
SELECT order_id, RPAD(status, 10, ' ') AS status_col
FROM orders;