bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths

Loading lesson path

Learn/SQL/SQL References
SQL•SQL References

MySQL MOD() Function

Example

SELECT MOD(18, 4);

Definition and Usage

The MOD() function returns the remainder of a number divided by another number.

Syntax

MOD(
x
,
y
)

OR

x
 MOD
y

OR

x
%
y

Parameter Values

ParameterDescription
xRequired. A value that will be divided by y
yRequired. The divisor

Technical Details

Works in:From MySQL 4.0

Previous

MySQL MIN() Function

Next

MySQL PI() Function