I have the following trigger:
CREATE TRIGGER actualizarConsulta
AFTER INSERT
ON ranking
FOR EACH ROW
BEGIN
DELETE FROM Consulta C
WHERE C.jugador_id = NEW.player_id;
END;
When I try to execute it I get the following error:
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 'C WHERE C. player_id = NEW.player_id; END 'at line 6