how to make trigger in phpmyadmin

Solutions on MaxInterview for how to make trigger in phpmyadmin by the best coders in the world

showing results for - "how to make trigger in phpmyadmin"
Stefan
08 Jan 2019
1ALTER TABLE sales_details
2ADD FOREIGN KEY fk_product_code(product_code)
3REFERENCES products(product_code)
4ON DELETE CASCADE;
Ludivine
30 Mar 2020
1 delimiter // 
2 CREATE TRIGGER removeforeing 
3  BEFORE DELETE ON products
4  FOR EACH ROW BEGIN
5    DELETE FROM sales_details WHERE product_code = OLD.product_code;
6 END// 
7 delimiter ;
Alma
02 Jun 2019
1delimiter //
2CREATE TRIGGER before_insert_money BEFORE INSERT ON money
3FOR EACH
4ROW
5BEGIN
6    UPDATE accounts SET balance=10.0;
7END;
8//
9delimiter ;