Curriculum
Course: SQL
Login

Curriculum

SQL

SQL References

0/80

MySQL Functions

0/139

SQL Server Functions

0/84

SQL Quick Ref

0/1
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