Oracle functions can implement many functions. The Oracle functions described below are used to process decimal places. If you are interested in Oracle function databases, take a look.
Oracle functions for processing decimal digits ():
1. Take the rounded decimal places
Select round (1.2345, 3) from dual;
Result: 1.235
2. retain the two decimal places.
Select trunc (1.2345, 2) from dual;
Result: 1.23
Select trunc (1.2399, 2) from dual;
Result: 1.23
3. Take an integer
Returns the largest integer greater than or equal to x:
SQL> select ceil (23.33) from dual;
Result: 24
Returns the largest integer equal to or less than x:
SQL> select floor (23.33) from dual;
Result: 23
Returns the value of x rounded to the right of the decimal point, which is rcund (x, [y]).
SQL> select role (23.33) from dual;
Result: 23
Returns x rounded to y decimal places: trunc (x, [y]).
SQL> select trunc (23.33) from dual;
Result: 23
The preceding section describes the Oracle functions used to process decimal places.
Learn about Oracle Text Functions
Oracle trunc () function usage
Provides you with an in-depth understanding of Oracle triggers
Differences between Oracle procedures and functions
Use of Oracle to_char Functions