Answers for "triggers phpmyadmin"

SQL
0

how to make trigger in phpmyadmin

delimiter // 
 CREATE TRIGGER removeforeing 
  BEFORE DELETE ON products
  FOR EACH ROW BEGIN
    DELETE FROM sales_details WHERE product_code = OLD.product_code;
 END// 
 delimiter ;
Posted by: Guest on May-23-2020
0

how to make trigger in phpmyadmin

ALTER TABLE sales_details
ADD FOREIGN KEY fk_product_code(product_code)
REFERENCES products(product_code)
ON DELETE CASCADE;
Posted by: Guest on May-23-2020
-1

Create Trigger in phpMyAdmin

CREATE TABLE contacts
( contact_id INT(11) NOT NULL AUTO_INCREMENT,
  last_name VARCHAR(30) NOT NULL,
  first_name VARCHAR(25),
  birthday DATE,
  CONSTRAINT contacts_pk PRIMARY KEY (contact_id)
);
Posted by: Guest on May-23-2020

Code answers related to "SQL"

Browse Popular Code Answers by Language