Thursday, 31 March 2016

SQL Mod

This will give the remainder.

     Syntax: mod (value, divisor) 

     Ex:
          SQL> select mod(7,4), mod(1,5), mod(null,null), mod(0,0), mod(-7,4) from dual;

              MOD(7,4)   MOD(1,5) MOD(NULL,NULL)   MOD(0,0)  MOD(-7,4)
   ------------      ----------      ---------------------       ----------- -------------
             3                  1                                                     0         -33

No comments:

Post a Comment