Unusual: MySQL
PL/SQL: I wouldn’t recommend to use the following construction: IF EXISTS (SELECT 1 FROM `table_a` WHERE `id` = `_ID`) THEN UPDATE `table_a` SET `value` = 1 WHERE `id` = `_ID`; ELSE INSERT INTO `table_a` […]; END IF; In my case there was a trigger (on table_a) who additionaly modifed “table_b”. When I changed the engine […]