ID EN
Arithmetic Operators

/

MySQL 8.4

Division:

Syntax

MYSQL
SELECT 3/5;
0.60

Examples

Example

Division by zero produces a NULL result:

MYSQL
SELECT 3/5;
0.60
Example 2

A division is calculated with BIGINT arithmetic only if performed in a context where its result is converted to an integer.

MYSQL
SELECT 102/(1-1);
NULL