Mega Code Archive

 
Categories / MySQL Tutorial / String Functions
 

RPAD(str,len,padstr)

If str is longer than len, the return value is shortened to len characters. mysql> SELECT RPAD('A',1,'?'); +-----------------+ | RPAD('A',1,'?') | +-----------------+ | A               | +-----------------+ 1 row in set (0.00 sec) mysql>