[Solved] MYSQL Error: BIGINT UNSIGNED value is out of range


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)


Example: select a – b from table

Change:select if(a >= b, a – b, – (b – a)) from table


Similar Posts: