Out-of-Range and Overflow Handling Suppose that a table  t1  has this definition: CREATE TABLE t1 (i1 TINYINT, i2 TINYINT UNSIGNED); With strict SQL mode enabled, an out of range error occurs: mysql>  SET sql_mode = ’TRADITIONAL’; mysql>  INSERT INTO t1 (i1, i2) VALUES(256, 256); ERROR 1264 (22003): Out of range value for column ’i1’ at row 1 mysql>  SELECT * FROM t1; Empty set (0.00 sec) With strict SQL mode not enabled, clipping with warnings occurs: mysql>  SET sql_mode = ’’; mysql>  INSERT INTO t1 (i1, i2) VALUES(256, 256); mysql>  SHOW WARNINGS; +---------+------+---------------------------------------------+ | Level | Code | Message | +---------+------+---------------------------------------------+ | Warning | 1264 | Out of range value for column ’i1’ at row 1 | | Warning | 1264 | Out of range value for column ’i2’ at row 1 | +---------+------+---------------------------------------------+ mysql>  SELECT * FROM t1; +------+------+ | i1 | i2 | +------+------+ | 127 | 255 | +------+------+ When strict SQL mode is not enabled, column-assignment conversions that occur due to clipping are reported as warnings for  ALTER TABLE ,  LOAD DATA ,  UPDATE , and multiple-row  INSERT  statements. In strict mode, these statements fail, and some or all the values are not inserted or changed, depending on whether the table is a transactional table and other factors. For details, see Section 5.1.11, “Server SQL Modes” . Overflow during numeric expression evaluation results in an error. For example, the largest signed  BIGINT value is 9223372036854775807, so the following expression produces an error: To enable the operation to succeed in this case, convert the value to unsigned; mysql>  SELECT 9223372036854775807 + 1; ERROR 1690 (22003): BIGINT value is out of range in ’(9223372036854775807 + 1)’ mysql>  SELECT CAST(9223372036854775807 AS UNSIGNED) + 1; +-------------------------------------------+ | CAST(9223372036854775807 AS UNSIGNED) + 1 | +-------------------------------------------+ | 9223372036854775808 | +-------------------------------------------+ Whether overflow occurs depends on the range of the operands, so another way to handle the preceding expression is to use exact-value arithmetic because  DECIMAL  values have a larger range than integers: mysql>  SELECT 9223372036854775807.0 + 1; +---------------------------+ | 9223372036854775807.0 + 1 | +---------------------------+ | 9223372036854775808.0 | +---------------------------+ Subtraction between integer values, where one is of type  UNSIGNED , produces an unsigned result by default. If the result would otherwise have been negative, an error results: 2020