• Skip to primary navigation
  • Skip to main content

Tech Honey

The #1 Website for Oracle PL/SQL, OA Framework and HTML

  • Home
  • HTML
    • Tags in HTML
    • HTML Attributes
  • OA Framework
    • Item in OAF
    • Regions in OAF
    • General OAF Topics
  • Oracle
    • statement
    • function
    • clause
    • plsql
    • sql
You are here: Home / Oracle / function / REMAINDER Function in Oracle SQL – PLSQL

REMAINDER Function in Oracle SQL – PLSQL

November 27, 2012 by techhoneyadmin

The REMAINDER Function in Oracle SQL / PLSQL is used to get the remainder when m is divided by n.

Syntax for the using the REMAINDER Function in Oracle SQL / PLSQL is:

SELECT REMAINDER(m,n)
FROM table_name;

  • The remainder is calculated using the formula:
  • m-(n*A), here A is an integer nearest to m / n.

  • The REMAINDER function in Oracle SQL / PLSQL uses the round function, where as the MOD function in Oracle SQL / PLSQL uses the floor function in it’s calculation.

Examples:

Using REMAINDER Function in Oracle SQL / PLSQL SELECT statement:

SELECT REMAINDER(10,3)
FROM dual;

Will return ‘1’

SELECT REMAINDER(11,3)
FROM dual;

Will return ‘-1’

SELECT REMAINDER(15,6)
FROM dual;

Will return ‘3’

SELECT REMAINDER(15.3,6.5)
FROM dual;

Will return ‘2.3’


Filed Under: function Tagged With: how to use REMAINDER Function in oracle database query, how to use REMAINDER Function in oracle plsql, how to use REMAINDER Function in oracle sql, REMAINDER Function in oracle plsql, REMAINDER Function in oracle sql, REMAINDERPLSQL, syntax and example of REMAINDER Function in oracle database query, syntax and example of REMAINDER Function in oracle plsql, syntax and example of REMAINDER Function in oracle sql, using REMAINDER Function in oracle database query, using REMAINDER Function in oracle plsql, using REMAINDER Function in oracle sql

Copyright © 2023 · Parallax Pro on Genesis Framework · WordPress · Log in