If the character to be padded is longer than the requested total length, it will be trimmed to the exact total. : LPAD « Char Functions « Oracle PL / SQL






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

   
  








Related examples in the same category

1.Lpad: makes a string a certain length by adding (padding) a specified set of characters to the left of the original string
2.LPAD(string, 10,'*')
3.select lpad( '*', 5, '*' )
4.Demo LEVEL inside of LPAD
5.Demo LEVEL inside of LPAD with '*'
6.Padding based on value length