数据库中有2个表。
答案 0 :(得分:0)
然后使用trigger,您可能需要多个更新和删除事件...例如:
CREATE TRIGGER trigger_name AFTER INSERT ON tbl_second_category
FOR EACH ROW
UPDATE tbl_third_category
SET col_for_delete_row = NEW.col_second_category_id
WHERE col_second_category_id = NEW.col_first_category_id;