Division Operator (/)
Syntax
Description
Division operator. Dividing by zero will return NULL. By default, returns four digits after the decimal. This is determined by the server system variable div_precision_increment which by default is four. It can be set from 0 to 30.
Dividing by zero returns NULL
. If the ERROR_ON_DIVISION_BY_ZERO
SQL_MODE is used (the default since MariaDB 10.2.4), a division by zero also produces a warning.
Examples
Changing div_precision_increment for the session from the default of four to six:
See Also
This page is licensed: GPLv2, originally from fill_help_tables.sql
Last updated
Was this helpful?