Example
Integer division (10/5):
sql
SELECT 10 DIV 5;
Definition and Usage
The DIV function is used for integer division (x is divided by y). An integer value is returned.
Syntax
text
x DIV y
Parameter Values
| Parameter | Description |
|---|---|
| x | Required. A value that will be divided by y |
| y | Required. The divisor |
Technical Details
| Works in: | From MySQL 4.0 |
|---|
More Examples
Example
Integer division (8/3):
sql
SELECT 8 DIV 3;