Oracle Certification Notes: Part IX

A continuation of my notes as I study for the Oracle Certified Associate credential.

In this post, I’ve simply referenced available Oracle Functions and associated examples. For a more appropriate description, please view the Oracle Documentation Library.

Function:ROUND(number, precision)

  • select round(1631.7344,−3) from dual is 2000.
  • select round(1331.7344,−3) from dual is 1000.
  • select round(1631.7344,−4) from dual is 0.
  • select round(5631.7344,−4) from dual is 10000.
  • select round(123456.78) from dual is 123457. (rounds to the nearest whole number)

    Function:TRUNC(number, precision)

  • select trunc(1631.7394,−3) from dual is 1000.
  • select trunc(1631.7394,2) from dual is 1631.73.
  • select trunc(1631.7394) from dual is 1631. (cuts decimal precision; creates whole number)

    Function:MOD(dividend, divisor)

  • select mod(15,4) from dual is 3.
  • select mod(5,50) from dual is 5.
  • select mod(4.9,4) from dual is 0.9.

    Posted via Woodland Blog (http://dramse01.blogspot.com)

  • Leave a Comment

    Your email address will not be published. Required fields are marked *

    This site uses Akismet to reduce spam. Learn how your comment data is processed.