LPAD() and RPAD(): pad the input parameter of character data types with blanks (or another character) from the left or right : RPAD « Char Functions « Oracle PL / SQL






LPAD() and RPAD(): pad the input parameter of character data types with blanks (or another character) from the left or right

  

Syntax:LPAD(<character string>, <length_of_resulting_string> [,<padding_string>])
RPAD(<character string>, <length_of_resulting_string>  [,<padding_string>])



SQL> SELECT
  2     LPAD('ABC',6,'***') result
  3  FROM dual;

RESULT
------
***ABC

SQL>

   
  








Related examples in the same category

1.Rpad: makes a string a certain length by adding (padding) a specified set of characters to the right
2.RPAD() function's behavior is identical to that of LPAD(), the only difference being the padding side.
3.select rpad( '*', 5, '*' )
4.Use rpad to add extra space
5.Padding department with < and >