2024-01-15 11:31:03 +00:00
|
|
|
DELIMITER $$
|
2024-01-25 16:33:54 +00:00
|
|
|
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`solunionCAP_afterInsert`
|
2024-01-15 11:31:03 +00:00
|
|
|
AFTER INSERT ON `solunionCAP`
|
|
|
|
FOR EACH ROW
|
|
|
|
BEGIN
|
|
|
|
UPDATE vn2008.Clientes c
|
|
|
|
JOIN creditClassification cc ON c.Id_Cliente = cc.client
|
|
|
|
JOIN creditInsurance ci ON ci.creditClassification = cc.id
|
|
|
|
SET creditInsurance = ci.credit * 2 WHERE ci.id = NEW.creditInsurance;
|
|
|
|
END$$
|
|
|
|
DELIMITER ;
|