Lpad: makes a string a certain length by adding (padding) a specified set of characters to the left of the original string : LPAD « Char Functions « Oracle PL / SQL






Lpad: makes a string a certain length by adding (padding) a specified set of characters to the left of the original string

 

SQL> -- Lpad: makes a string a certain length by adding (padding) a specified set of characters to the left of the original string.
SQL>
SQL> -- LPAD stands for "left pad."
SQL>
SQL> -- The general format for this function is:
SQL>
SQL> -- LPAD(string, length_to_make_string,
SQL> --   what_to_add_to_left_of_string)
SQL>
SQL> SELECT LPAD('Column', 15, '.') FROM dual;

LPAD('COLUMN',1
---------------
.........Column


           
         
  








Related examples in the same category

1.If the character to be padded is longer than the requested total length, it will be trimmed to the exact total.
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