What is a function?
A function is similar to an operator in operation. A function is a name that performs a specific task. A function
may or may not take values (arguments) but it always returns a value as the result. If function takes values then
these values are to be given within parentheses after the function name. The following is the general format of a
function.
Types of functions
Functions are classified based on the type of data on which they perform the operation. The following are the
different types of functions available in Oracle.
- Arithmetic Functions.
- Date & Time functions.
- String functions.
- Conversion functions.
- Miscellaneous functions.
- Group functions
Arithmetic Functions
In addition to that, the following functions are available:
Syntax | Details |
---|---|
oxy_add(param1, … , paramN, ‘returnType’) | Adds the values of all parameters from param1 to paramN. |
oxy_subtract(param1, …, paramN, ‘returnType’) | Subtracts the values of parameters param2 to paramN from param1. |
oxy_multiply(param1, …, paramN, ‘returnType’) | Multiplies the values of parameters from param1 to paramN. |
oxy_divide(param1, param2, ‘returnType’) | Performs the division of param1 to param2. |
oxy_modulo(param1, param2, ‘returnType’) | Returns the reminder of the division of param1 to param2. |