MySQL触发器怎么实现主表添加一条数据时,可以通过外键把相关的子表...答:KEY(id) );-- 插入测试主表数据.INSERT INTO test_main(id, value) VALUES (1, 'ONE');INSERT INTO test_main(id, value) VALUES (2, 'TWO');-- 插入测试子表数据.INSERT INTO test_sub(id, main_id, value) VALUES (1, 1, 'ONEONE');INSERT INTO test_sub(id, main_id,...