PL/SQL implements a number of functions that are useful when working with numbers. We list those functions in Table 9-6, and describe each of them in detail in the sections that follow.

Table 9-6. PL/SQL’s built-in numeric functions

Name |
Description |
---|---|

ABS |
Returns the absolute value of a number. |

ACOS |
Returns the inverse cosine. |

ASIN |
Returns the inverse sine. |

ATAN |
Returns the inverse tangent. |

ATAN2 |
Returns the inverse tangent of a value, but allows you to pass that value differently than when using ATAN. |

BITAND |
Performs an AND operation on the bits from two positive integer numbers. |

CEIL |
Returns the smallest integer greater than or equal to the specified number. |

COS |
Returns the cosine. |

COSH |
Returns the hyperbolic cosine. |

EXP ( |
Returns the number |

FLOOR |
Returns the largest integer equal to or less than the specified number. |

LN ( |
Returns the natural logarithm of |

LOG ( |
Returns the logarithm, base |

MOD ( |
Returns the remainder of |

POWER ( |
Returns |

ROUND ( |
Returns |

SIGN ( |
Returns 1 if |

SIN |
Returns the sine. |

SINH |
Returns the hyperbolic sine. |

SQRT |
Returns the square root of a number. |

TAN |
Returns the tangent. |

TANH |
Returns the hyperbolic tangent. |

TRUNC ( |
Returns |

Start Free Trial

No credit card required