SQL LPAD()函数
LPAD(str,len,padstr)
返回字符串str,左填充用字符串str中垫到len字符长度。如果str为大于len,返回值被缩短至len个字符。
SQL> SELECT LPAD('hi',4,'??'); +---------------------------------------------------------+ | LPAD('hi',4,'??') | +---------------------------------------------------------+ | ??hi | +---------------------------------------------------------+ 1 row in set (0.00 sec)