val INT NOT NULL, str VARCHAR(100), bin BLOB); Query OK, 0 rows affected (0.03 sec) mysql> INSERT INTO excludetable SET val = 1000, str = 'abcde', bin = RANDOM_BYTES(100); Query OK, 1 row affected (0.00 sec) mysql> INSERT INTO excludetable SET val = 1010, str = 'vwxyz', bin = RANDOM_BYTES(100); Query OK, 1 row affected (0.01 sec) 20
mysql> CREATE TABLE includetable_from_exclude (id INT PRIMARY KEY AUTO_INCREMENT, val INT NOT NULL, str VARCHAR(100)); Query OK, 0 rows affected (0.03 sec) 24 mysql> CREATE TRIGGER ins_rec BEFORE INSERT ON excludetable -> FOR EACH ROW INSERT INTO includetable_from_exclude VALUES(NEW.id, NEW.val, NEW.str); Query OK, 0 rows affected (0.01 sec)