2024-01-15 11:31:03 +00:00
|
|
|
DELIMITER $$
|
2024-08-20 08:06:10 +00:00
|
|
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`creditInsurance_afterInsert`
|
2024-01-15 11:31:03 +00:00
|
|
|
AFTER INSERT ON `creditInsurance`
|
|
|
|
FOR EACH ROW
|
|
|
|
BEGIN
|
|
|
|
UPDATE `client` c
|
|
|
|
JOIN vn.creditClassification cc ON cc.client = c.id
|
2024-09-11 11:42:04 +00:00
|
|
|
SET creditInsurance = NEW.credit WHERE cc.id = NEW.creditClassificationFk;
|
2024-01-15 11:31:03 +00:00
|
|
|
|
|
|
|
END$$
|
|
|
|
DELIMITER ;
|