salix/db/routines/vn/triggers/saleBuy_AI.sql

14 lines
322 B
SQL

DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`saleBuy_AI`
AFTER INSERT ON `saleBuy`
FOR EACH ROW
BEGIN
/* Activar de nuevo cuando volvamos a vender fruta y verdura
*
UPDATE vn.sale s
SET s.concept = CONCAT(s.concept, ' Lote: ', NEW.buyFk)
WHERE s.id = NEW.saleFk;
*/
END$$
DELIMITER ;