Skip to Main Content
  • Questions
  • extract only two digit after fraction

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question.

Asked: June 07, 2018 - 1:14 pm UTC

Last updated: June 11, 2018 - 7:04 am UTC

Version: 12c

Viewed 1000+ times

You Asked

For example, My query is following
input data is in number format :- 123.456
and I want to see 123.45.
Not need round off.

and Connor said...

A trunc will take care of it
SQL> select to_char(trunc(123.456,2)) from dual;

TO_CHA
------
123.45



Is this answer out of date? If it is, please let us know via a Comment

More to Explore

PL/SQL demos

Check out more PL/SQL tutorials on our LiveSQL tool.

PL/SQL docs

PL/SQL reference manual from the Oracle documentation library