Precision Math Examples ERROR 1264 (22003): Out of range value adjusted for column ’i’ at row 1 mysql>  SELECT i FROM t; Empty set (0.00 sec) mysql>  SET sql_mode=’’; Query OK, 0 rows affected (0.01 sec) mysql>  CREATE TABLE t (i TINYINT); Query OK, 0 rows affected (0.00 sec) mysql>  INSERT INTO t SET i = 1 / 0; Query OK, 1 row affected (0.00 sec) mysql>  SELECT i FROM t; +------+ | i | +------+ | NULL | +------+ 1 row in set (0.03 sec) mysql>  SET sql_mode=’STRICT_ALL_TABLES,ERROR_FOR_DIVISION_BY_ZERO’; Query OK, 0 rows affected (0.00 sec) mysql>  CREATE TABLE t (i TINYINT); Query OK, 0 rows affected (0.00 sec) mysql>  INSERT INTO t SET i = 1 / 0; ERROR 1365 (22012): Division by 0 mysql>  SELECT i FROM t; Empty set (0.01 sec) mysql>  CREATE TABLE t SELECT 2.5 AS a, 25E-1 AS b; Query OK, 1 row affected (0.01 sec) Records: 1 Duplicates: 0 Warnings: 0 mysql>  DESCRIBE t; Example 6 . Exact-value literals are evaluated as exact values. Approximate-value literals are evaluated using floating point, but exact-value literals are handled as DECIMAL : Example 7 . If the argument to an aggregate function is an exact numeric type, the result is also an exact numeric type, with a scale at least that of the argument. Consider these statements: However, division by zero is an error if the proper SQL modes are in effect: In nonstrict mode, division by zero has a result of  NULL : Example 5 : In strict mode and with  ERROR_FOR_DIVISION_BY_ZERO  set, division by zero causes an error, not a result of  NULL . mysql>  CREATE TABLE t (i INT, d DECIMAL, f FLOAT); 2461 +-------+-----------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+-----------------------+------+-----+---------+-------+ | a | decimal(2,1) unsigned | NO | | 0.0 | | | b | double | NO | | 0 | | +-------+-----------------------+------+-----+---------+-------+ 2 rows in set (0.01 sec)