Топ-100
 
RDBMS Type: MySQL
Topic

Syntax:
DIV

Integer division. Discards from the division result any fractional part
to the right of the decimal point.

If either operand has a noninteger type, the operands are converted to
DECIMAL and divided using DECIMAL arithmetic before converting the
result to BIGINT. If the result exceeds BIGINT range, an error occurs.

URL: https://dev.mysql.com/doc/refman/8.0/en/arithmetic-functions.html

Example

mysql> SELECT 5 DIV 2, -5 DIV 2, 5 DIV -2, -5 DIV -2;
-> 2, -2, -2, 2