Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE TRIGGER `increment_goods_count` AFTER INSERT ON `supply`
- FOR EACH ROW BEGIN
- UPDATE goods SET
- `goods`.`count` = `goods`.`count` + NEW.`count`,
- `goods`.`price` = new_price(NEW.`initial_price`)
- WHERE `goods`.`id_goods` = NEW.`id_goods`;
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement