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)

0 條評論,你可以發表評論,我們會進行改進
Comment author placeholder