Causes:
When two fields are trying to be subtracted, if one or both fields are of type unsigned, an error is reported if the value to be subtracted is less than 0 (BIGINT UNSIGNED value is out of range)
.
Handling:
Example: select a – b from table
Change:select if(a >= b, a – b, – (b – a)) from table
Similar Posts:
- Database upgrade from Zabbix 5.0.15 to Zabbix 5.2.7 failed
- [Solved] Mybatis multi-table query error: Column ‘id’ in field list is ambiguous
- [Solved] MySQL query reports an error: Legal mix of settlements
- [Solved] Search with xadmin_ Related field got invalid lookup: icontains
- [Solved] error: aggregate value used where an integer was expected
- [Solved] MySQL Add New Field Error: ERROR 1118 — Row size too large. The maximum row size for the used table type
- [Solved] mapper.xml Error: java.lang.AbstractMethodError: Method oracle/jdbc/driver/OracleResultSetImpl.getNString(Ljava/lang/String;)Ljava/lang/String; is abstract,
- MYSQL ERROR 1005 (HY000): Can’t create table [How to Solve]
- [Solved] MYSQL add foreign key error: Referencing column ‘xx’ and referenced column ‘xx’ in foreign key constraint ‘xxx’ are incompatible.
- MySQL Error Number 1005 Can’t create table (Errno:150)