Just as with the string and date functions, we have an entire set of functions that deals strictly with numeric values and arithmetic operations. We will look at a few of the more common examples here, but there are many different functions you can call in order to manipulate numbers in Oracle.
The ROUND()
function is straightforward in its purpose—it rounds numeric values according to standard mathematic rules. Digits less than five are rounded down, and values greater than or equal to five are rounded up. However, because of the complexity involved in specifying the decimal place to which values should be rounded, learning to manipulate ROUND()
can be tricky. Let's first look at an example using numeric literals, as shown in the following screenshot:
In this example, we are using the quotient that results from dividing 12345 and 100, the numeric value 123.45. The ROUND()
function takes two inputs: the value to be rounded and the decimal place to which to...