Curriculum
Course: MYSQL
Login

Curriculum

MYSQL

MySQL References

0/140
Text lesson

DIV

Example

Performing integer division: 10 divided by 5.

SELECT 10 DIV 5

Definition and Usage

The DIV function performs integer division (dividing x by y), resulting in an integer value.

Syntax

x DIV y

Parameter Values

Parameter

Description

x

Necessary: A value that will undergo division by y.

y

Necessary: The value by which division will be performed.

Technical Details

Works in: From MySQL 4.0

More Examples

Example

Performing integer division: dividing 8 by 3.

SELECT 8 DIV 3