검색결과 리스트
글
출처 : http://www.techonthenet.com/oracle/functions/mod.php
Oracle/PLSQL: Mod Function
In Oracle/PLSQL, the mod function returns the remainder of m divided by n.
The syntax for the mod function is:
mod( m, n )
The mod is calculated as:
m - n * floor(m/n)
Note:
The mod function uses the floor function in its formula, whereas the remainder function uses the round function in its formula.
The mod function returns m if n is 0.
Applies To:
- Oracle 8i, Oracle 9i, Oracle 10g, Oracle 11g
For example:
mod(15, 4) | would return 3 |
mod(15, 0) | would return 15 |
mod(11.6, 2) | would return 1.6 |
mod(11.6, 2.1) | would return 1.1 |
mod(-15, 4) | would return -3 |
mod(-15, 0) | would return -15 |
'DB / NoSQL > Oracle / Toad' 카테고리의 다른 글
[Oracle] 대문자, 소문자 변환함수 (0) | 2011.11.15 |
---|---|
[Oracle] AWR (Automatic Workload Repository) (0) | 2011.11.10 |
[즐겨찾기] Oracle PL/SQL 강좌 링크 (0) | 2011.11.08 |
[Oracle] 문자열을 숫자 변환 TO_NUMBER (0) | 2011.11.08 |
[Oracle SQL Developer] Unable to create an instance of the Java Virtual Machine Located at path: (0) | 2011.11.04 |
RECENT COMMENT