MySQL mod()函數
MOD(N,M)
該函數返回N除以M後的餘數. 分請看下麵的例子:
mysql>SELECT MOD(29,3); +---------------------------------------------------------+ | MOD(29,3) | +---------------------------------------------------------+ | 2 | +---------------------------------------------------------+ 1 row in set (0.00 sec)