Mega Code Archive

 
Categories / Oracle PLSQL Tutorial / Numerical Math Functions
 

MOD(x, y) gets the remainder when x is divided by y

The following example uses MOD() to display the remainder when 8 is divided by 3 and 4, respectively: SQL> SQL> SELECT MOD(8, 3), MOD(8, 4) FROM dual;   MOD(8,3)   MOD(8,4) ---------- ----------          2          0 SQL>