79808815

Date: 2025-11-04 11:03:04
Score: 0.5
Natty:
Report link

Change your query to below:

CREATE TRIGGER devolver_a_refugio2
AFTER DELETE ON adopciones
FOR EACH ROW
BEGIN
  UPDATE animal 
  SET situacion = 'refugio'
  WHERE id = OLD.id_animal;
END;

OLD.id_animal : It refers to the id_animal value from the deleted record in the adopciones table.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Darshan Unadkat