MySQL wrote:
You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use
near ‘DELETE FROM surebet.fork_bet WHERE surebet_fork_key NOT IN
(SELECT super’ at line 2
DELETE
FROM superbet.fork_bet
WHERE superbet_fork_key
NOT IN (
SELECT superbet_fork_key
FROM fork_bet_temp
WHERE fork_bet_temp.superbet_fork_key = fork_bet.superbet_fork_key
);
Changed the WHERE clause on both, looks like you tried to do an underscore where a period was required, and you named the second WHERE incorrectly, fork_bet isn’t the table, fork_bet_temp is.
If you get an error with that, post your table layout.