sql >> Database >  >> RDS >> Mysql

Meerdere insert/update statements binnen trigger?

Uit de documenten:Triggersyntaxis maken

CREATE TRIGGER testref BEFORE INSERT ON test1
  FOR EACH ROW BEGIN
    INSERT INTO test2 SET a2 = NEW.a1;
    DELETE FROM test3 WHERE a3 = NEW.a1;
    UPDATE test4 SET b4 = b4 + 1 WHERE a4 = NEW.a1;
  END;



  1. MySQl-fout #1064

  2. ComboBox.ValueMember en DisplayMember

  3. Hoe Rails database.yml te beheren

  4. REGEXP_INSTR() Functie in Oracle