sql – Add leading spaces for numbers

Question:

How to add leading spaces for numbers in Oracle SQL? Can you share some Oracle SQL literature? Language Russian / English.

Answer:

Use the LPAD () function:

select lpad(to_char(numeric_column_name), 8, ' ') from ...

8 in this example is the length of the target string.

PS convinced the best Oracle documentation is Oracle Online Documentation

Scroll to Top