Problem with trigger
Hi!, I need execute a trigger when only 1 field of my table alumnos be updated,
the field name is 'deuda' (without '' obviously) I need to execute the trigger when this field be updated, this is my code
------------------------------------------------------------------
DELIMITER $$
CREATE TRIGGER Tpago
BEFORE UPDATE on alumnos.deuda
FOR EACH ROW
BEGIN
UPDATE `alumnos` set `deuda` = OLD.deuda - NEW.deuda
where `alumnos`.`a` = OLD.a;
END $$
DELIMITER ;
------------------------------------------------------------------
And MySQL error is
#1146 - Table 'alumnos.deuda' does not exist!.
I really apreciate ur answers thx!
Subject
Views
Written By
Posted
Problem with trigger
1390
February 01, 2018 11:09AM
698
February 01, 2018 11:25AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.