I know how to do this, but i think I\'ll overcomplicate it with double selects and so on.
How can you do this (example in pseudo-sql)
UPDATE some_table S
If you're using TINYINT (0 and 1) then do a simply XOR (https://dev.mysql.com/doc/refman/8.0/en/logical-operators.html#operator_xor)
UPDATE `some_table` SET `an_int_value` = `an_int_value` ^ 1
Testing:
SELECT 0 ^ 1; /* returns 1 */
SELECT 1 ^ 1; /* returns 0 */