Mega Code Archive

 
Categories / Oracle PLSQL / Char Functions
 

If the character to be padded is longer than the requested total length, it will be trimmed to the exact total

SQL> SELECT   2     LPAD('ABC',6,'***') result1,   3     LPAD('ABC',4,'***') result2,   4     LPAD('ABC',2,'***') result3   5  FROM dual; RESULT RESU RE ------ ---- -- ***ABC *ABC AB